|Subject:||Re: [fluid-dev] MIDI bank select problems|
|Date:||Thu, 28 Nov 2013 11:51:25 -0700|
I'm toying around with adding a MIDI interface to OpenAL Soft, allowing applications to specify timestamped MIDI events for sample-perfect timing. I'm using FluidSynth to render the MIDI into my output buffer to get mixed in with all the other sounds. In general, it's all working splendidly.
In the interest of standardization, I'm forcing the synth to use "mma" bank select mode, which as far as I understand, conforms to General MIDI Level 2 <https://en.wikipedia.org/wiki/General_MIDI_Level_2>. I do this by setting
fluid_settings_setstr(self->Settings, "synth.midi-bank-select", "mma");
self->Synth = new_fluid_synth(self->Settings);
When I do this, I find I'm not able to change the bank used by channel 9 (0-based counting). According to the above wikipedia entry, it's supposed to be possible to use all 16 channels for melodic instruments, however when I try to change channel 9 to bank 0 via CC0 and CC32 messages (followed immediately by an appropriate program change), FluidSynth continues using bank 128 on channel 9.
Also, I'm confused about what exactly I'm supposed to specify to change the bank. According to FluidSynth's wiki, <http://sourceforge.net/apps/trac/fluidsynth/wiki/FluidSettings>, 'mma' selects a bank according to the math:
CC0*128 + CC32
However, according to the GM2 wikipedia page, "General MIDI 2 compatible synthesizers access all of the 256 instruments by setting cc#0 (Bank Select MSB) to 121 and using cc#32 (Bank Select LSB) to select the variation bank before a Program Change. Variation bank 0 contains full GM sound set." which says that to set an instrument from melodic bank 0, you set CC0 to 121 and CC32 to 0, followed by a program change for the wanted instrument.
Additionally, selecting a drum bank is done by setting CC0 to 120 and CC32 to 0, then a program change for the wanted drum kit. This doesn't at all follow the math detailed above.
In any case, I've tried setting CC0=0 + CC32=0 and CC0=121 + CC32=0, and both result in FluidSynth continuing to use bank 128 on channel 9.
Am I doing something wrong, or misunderstanding something? Thanks for any help you can provide.
|[Prev in Thread]||Current Thread||[Next in Thread]|