Closed pirat73 closed 5 years ago
How can i modify the code below, for using only one midi-channel instead of omni-mode (all channel) input...?
def MidiCallback(message, time_stamp): global playingnotes, sustain, sustainplayingnotes global preset messagetype = message[0] >> 4 messagechannel = (message[0] & 15) + 1 note = message[1] if len(message) > 1 else None midinote = note velocity = message[2] if len(message) > 2 else None
Something like:
if messagechannel != 10: return
would filter out all channels except 10. Good luck! Please post on http://samplerbox.org/forum to continue this discussion.
How can i modify the code below, for using only one midi-channel instead of omni-mode (all channel) input...?
def MidiCallback(message, time_stamp): global playingnotes, sustain, sustainplayingnotes global preset messagetype = message[0] >> 4 messagechannel = (message[0] & 15) + 1 note = message[1] if len(message) > 1 else None midinote = note velocity = message[2] if len(message) > 2 else None