From bae2e0dcc6c2a342113392eb56c0d32026127a58 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Tue, 14 May 2019 17:58:24 +0200 Subject: [PATCH] Still some minor addentum to the GMA parsing --- mapping/GrandMA2.py | 37 ++++++++++++++++++++++++++++++++----- mapping/base.py | 3 ++- midiRebind.py | 5 ++++- patch/gma.ini | 4 ++++ 4 files changed, 42 insertions(+), 7 deletions(-) diff --git a/mapping/GrandMA2.py b/mapping/GrandMA2.py index f083bb8..2be292c 100644 --- a/mapping/GrandMA2.py +++ b/mapping/GrandMA2.py @@ -2,7 +2,9 @@ from mapping.base import BasicMessageParse,BasicActions,MatchError,BasicMidiInte import mido import re,configparser -commandlist={1:"go",2:"stop",3:"resume",4:"timed_go",6:"set",7:"fire",11:"go_off",10:"exec"} +commandlist={1:"go",2:"stop",3:"resume",4:"timed_go",6:"set",7:"fire",10:"go_off"} +# Doc says 11 is go_off, test says otherwise + #A MessageParse object MUST be included in the file, the rest is implementation Specific class MessageParse(BasicMessageParse): """Parsing of a gma SyEx message this parser is used once and will return a different Action object every time it is called""" @@ -36,6 +38,21 @@ class MessageParse(BasicMessageParse): def __str__(self): return "[id:{}/df:{}/cmd:{}/data:{}]".format(self.deviceid,self.commandformat,self.command,self.data) + +def addasHex(data): + "Take a table, return a str of every hex48 gma specific nb and the rest of the table" + i,mx=0,len(data) + r="" + while i