A few bugfixes
This commit is contained in:
parent
fc5e1d9e5c
commit
64a1d2ed4a
|
|
@ -169,7 +169,7 @@ class BasicActions(object):
|
|||
try:
|
||||
return [BasicMidiTrigger(self.interface.interfaceOut(int(interfaceout)),midiaction,self.findNote(key,startkey,stopkey,note),intensity)]
|
||||
except (KeyError):
|
||||
print("[WARNING] Can't find interface {} for note {} action {}, legal interfaces are {}".format(interfaceout,note,action,[i for i in self.interface.output.keys()]))
|
||||
print("[WARNING] Can't find interface {} for note {} action {}, legal interfaces are {}".format(interfaceout,note,action,[i for i in self.interface.outputs.keys()]))
|
||||
return [] #This choice is not necessary the best, but I figure it's easier that forcing the config to be perfect
|
||||
except ValueError:
|
||||
print("[WARNING] Incorrect values given to the midi message {}".format(action))
|
||||
|
|
@ -258,15 +258,18 @@ class BasicMidiTrigger(object):
|
|||
# if not cond(val):
|
||||
# return #A condition isn't met, returning
|
||||
change=self.value
|
||||
|
||||
if self.valuefn:
|
||||
change=self.valuefn(val)
|
||||
if self.toggle!=None:
|
||||
elif self.toggle!=None:
|
||||
if self.toggle:
|
||||
change=self.valtrue
|
||||
else:
|
||||
change=self.valfalse
|
||||
if change!=self.value and change != None and change !="":
|
||||
self.value=change
|
||||
else:
|
||||
change=val
|
||||
if change != None and change !="":
|
||||
self.value=val
|
||||
self.valuetype[list(self.valuetype)[0]]=change
|
||||
self.message=self.message.copy(**self.valuetype)
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class Actions(BasicActions):
|
|||
try:
|
||||
listact=self.findAction(match.type,match.note,"*")
|
||||
for act in listact:
|
||||
act(value)
|
||||
act(match.value)
|
||||
except:
|
||||
# No action linked to the trigger
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -1,24 +1,16 @@
|
|||
[interface]
|
||||
input=MIDI Mix MIDI 1
|
||||
output1=KMidimon
|
||||
output2=MIDI Mix MIDI 1
|
||||
output1=MIDI Mix MIDI 1
|
||||
output2=Midi Through Port-0
|
||||
inputchanel = 1
|
||||
outputchannel1 = 1
|
||||
outputchannel2 = 1
|
||||
mapping = midi
|
||||
|
||||
[note_on]
|
||||
0-99 = 2/note/0
|
||||
0-99 = 1/note/0
|
||||
0-99/toggle = 127/0
|
||||
0-50 = 1/cc/11
|
||||
57-67 = 1/cc/12-32
|
||||
56 = 1/note/127
|
||||
56/val = lambda x: min(x,50)*2
|
||||
0-100 = 2/note/0
|
||||
|
||||
[control_change]
|
||||
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
|
||||
1-100 = 2/cc/0
|
||||
|
|
|
|||
Loading…
Reference in New Issue