From b67ef34693cac1893af2661581c85af859e457a7 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Mon, 13 May 2019 17:49:11 +0200 Subject: [PATCH] Bugtesting and minor fixes --- mapping/GrandMA2.py | 3 ++- midiRebind.py | 2 +- patch/gma.ini | 32 ++++++++++---------------------- 3 files changed, 13 insertions(+), 24 deletions(-) diff --git a/mapping/GrandMA2.py b/mapping/GrandMA2.py index 0a0002c..f083bb8 100644 --- a/mapping/GrandMA2.py +++ b/mapping/GrandMA2.py @@ -2,7 +2,7 @@ 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"} +commandlist={1:"go",2:"stop",3:"resume",4:"timed_go",6:"set",7:"fire",11:"go_off",10:"exec"} #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""" @@ -29,6 +29,7 @@ class MessageParse(BasicMessageParse): self.commandformat=message[3] self.command=message[4] self.data=message[5:] + #print(self) return self except: raise MatchError("Can't parse the data {}".format(message)) diff --git a/midiRebind.py b/midiRebind.py index c336b5a..40519a9 100644 --- a/midiRebind.py +++ b/midiRebind.py @@ -32,7 +32,7 @@ if __name__ == '__main__': except Module.MatchError: pass except: - print("[Unexpected error] {}".format(sys.exc_info())) + print("[Unexpected error@midibind.py] {}".format(sys.exc_info())) except ImportError: print("[Error] Module {} doesn't exist".format(interpath)) except KeyboardInterrupt: diff --git a/patch/gma.ini b/patch/gma.ini index b80ad1e..a8bdeed 100644 --- a/patch/gma.ini +++ b/patch/gma.ini @@ -1,28 +1,16 @@ [interface] - input=Midi Through Port-0 - output1=Midi Through Port-0 - output2=KMidimon + input=Scarlett 6i6 USB MIDI 1 + output1=MIDI Mix MIDI 1 + output2=Scarlett 6i6 USB MIDI 1 inputchanel = 1 outputchannel1 = 1 outputchannel2 = 1 mapping = GrandMA2 -[set/1] - 0-99 = 1/cc/10 - 0-99/toggle = 22/42 - 0-50 = 2/cc/11 - 57-67 = 1/cc/12-32 - 56 = 1/note/127 - 56/val = lambda x: min(x,50)*2 -[set/5] - 1 = 1/cc/2;2/note/19/127 - -[fire] - 13 = 1/note/10 - 15 = 1/cc/44/127 - 17-27 = cc/45/127 - 29-37 = cc/46-46/127 - 38 = 1/cc/65/124;2/cc/79/100;note/25 - 38/toggle = 0/127 -[fire/5] - 15 = 1/cc/2;2/note/19/127 +[set/2] + 0-99 = 2/cc/1 + #0-99/toggle = 0/127 + #0-50 = 2/cc/11 + #57-67 = 1/cc/12-32 + #56 = 1/note/127 + #56/val = lambda x: min(x,50)*2