ProgramChange to Switch Instrument?
Started by cforster




4 posts in this topic
cforster

4 posts 2 threads Joined: Jun 2021
20-06-21, 17:39 -
#3
So, I added the code provided, but it doesn't appear to change anything. Indeed, I don't believe the changed code is ever run. 

To test, I added a print statement immediately after elif gv.drumpad: (line 893, or maybe 892... I added a line), and it never got printed.

I added some more print statements, and it seems like gv.drumpad is set to false, so the altered elif block isn't running. I printed out mididev, message, gv.MULTI-TIMBRALS, gv.MIDI_CHANNEL, and dv.drumpad. When the program change toggle is on, message is a two digit number; otherwise the drumpad sends a list with three numbers. I'll paste the output of my debugging print statements below, but I worry a little that in tinkering with config files, maybe I changed something that is preventing the drumpad now from being recognized properly. I don't think so... but I'm not sure. 

I'll return to the docs to see if I can come up with a way to map drumpad to PROGRAM change. I think I am being hampered by being a complete MIDI newb, and so the difference between a note and a CC, etc, is a little tricky to follow.

Thanks,

Chris

Debug statements produced by:


Quote:print '%s -> %s' % (mididev, message)

print 'gv.MULTI_TIMBRALS: %s' % (gv.MULTI_TIMBRALS)
print 'gv.MIDI_CHANNEL: %s' % (gv.MIDI_CHANNEL)
print 'gv.drumpad: %s' % (gv.drumpad)


MPK mini 3 24:0 -> [153, 36, 97]
gv.MULTI_TIMBRALS: {'': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'Midi Through:Midi Through Port-0 14:0': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'Midi Through 14:0': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}
gv.MIDI_CHANNEL: 1
gv.drumpad: False
MPK mini 3 24:0 -> [137, 36, 0]
gv.MULTI_TIMBRALS: {'': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'Midi Through:Midi Through Port-0 14:0': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'Midi Through 14:0': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}
gv.MIDI_CHANNEL: 1
gv.drumpad: False
MPK mini 3 24:0 -> [201, 0]
gv.MULTI_TIMBRALS: {'': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'Midi Through:Midi Through Port-0 14:0': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'Midi Through 14:0': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}
gv.MIDI_CHANNEL: 1
gv.drumpad: False


Messages In This Thread
RE: ProgramChange to Switch Instrument? - by cforster - 20-06-21, 17:39