This project has moved. For the latest updates, please go here.

MIDI Bank Select

Mar 8, 2013 at 3:01 PM
Does anyone know how to do a "Normal" Bank select in code?

I can do a Controller 0 select:
ControlChangeEvent BSelect = new ControlChangeEvent(AbsoluteTime, Channel, (MidiController)0, BankNumber);

And a Controller 32 works the same way.

But the "Normal" method eludes me. I've seen conflicting expanations of it, but the latest was "send a 0 and Bank number, then a 32 and Patch number. I tried

ControlChangeEvent BSelect1 = new ControlChangeEvent(AbsoluteTime, Channel, (MidiController)0, BankNumber);
Tracks.AddEvent(BSelect1, TrackNumber);
ControlChangeEvent BSelect2 = new ControlChangeEvent(AbsoluteTime+1, Channel, (MidiController)32, PatchNumber);
Tracks.AddEvent(BSelect2, TrackNumber);

but that didn't work.

Any ideas?
Coordinator
Mar 11, 2013 at 9:50 PM
If you are able to find or create a MIDI file that contains a correct bank change, then you can use NAudio to read it and see what messages it contains
Mar 12, 2013 at 12:06 AM
markheath wrote:
If you are able to find or create a MIDI file that contains a correct bank change, then you can use NAudio to read it and see what messages it contains
I'll see what I can find. Thanks.

But I think the mistake I made is not doing an atual PatchChange event after the 0 & 32.