dsacre/mididings

send bank and program change on portsplit

Opened this issue · 1 comments

HI, I can't find how to send both program and bank change on a specific port. my setup is :
8: Scene("amsynth - sweptbass",
PortSplit({
'nomad25': Output('am1', 1, 108),
'lpk25': Transpose(0) >> Output('ch1', 2)}
),
),

which sccessfully change to the good sound on amsynth, except that it doesn't change the "bank".
I have read on the reference guide :
Output(port, channel, program=None, volume=None, pan=None, expression=None, ctrls={})

Routes incoming events to the specified port/channel. Optionally, when switching to the scene containing this unit, a program change and/or arbitrary control changes can be sent. To send a bank select in addition to the program change, program can be a tuple with two elements, where the first element is the bank number, and the second is the program number.

could you give me an example on the syntax of the "tuple", I might miss something, here is what I tried :
8: Scene("amsynth - sweptbass",
PortSplit({
'nomad25': Output('am1', 1, (4,108)),
'lpk25': Transpose(0) >> Output('ch1', 2)}
),
),

I want to change to bank 4 and program 108... Thanks

You've got the right syntax, as far as I can see this should work... Have you checked with a MIDI logger which events get sent from mididings?

For example you could run another instance of mididings to print MIDI events (mididings -p, or mididings "Print()" if you're running an older version), and connect it to the 'am1' output. You should see something like this when switching to scene 8:

[ 1,  1] Ctrl:       0   0  (Bank select (MSB))
[ 1,  1] Ctrl:      32   4  (Bank select (LSB))
[ 1,  1] Program:      108

Also, there seems to be some confusion with MSB and LSB, depending on the software/devices used. You may want to try setting the MSB to 4 instead:

Output('am1', 1, (4*128, 108))