|Subject:||Re: [fluid-dev] Propose changes for drum channels support|
|Date:||Wed, 26 Jan 2011 23:41:19 -0800|
|User-agent:||Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:220.127.116.11) Gecko/20100227 Thunderbird/3.0.3|
Since SoundFont hardware devices expect the bank change commands to only be in the MSB, and those correspond to the bank numbers encoded in the SoundFont banks themselves, I think FluidSynth should behave accordingly. Namely, it should read SoundFont bank numbers scaled to MSB. The player code should handle both MSB and LSB, and in case of XG MIDI data setting the bank LSB, the preset search fallback should search for a bank number with the LSB masked off in the event that a MSB+LSB match is not found. This is what I currently do in my modified FluidSynth which I link into foo_midi.
Of course, I'm not sure what to do about the bank LSB field. While the SoundFont 2.x file format does support a 16-bit bank field, I don't think any editors actually allow setting the bank to higher than 128, the drum bank.
Although the above seems to be fine for when I'm using a largely General MIDI preset with AnotherXG as the first bank loaded, as a fallback. In fact, it even takes care of XG style drum mapping, since bank 16256, or MSB 127, is filled with drum instruments in that bank. In fact, my higher level fallback bank, SGP v2.01, even has drum instruments in bank 127.
So, I have changed the defined drum bank to 16256, and the default SoundFont loader also multiplies file bank numbers by 128 so they're in the MSB, or sets it to 16256 if it's 128. This nicely handles XG drum channel settings, and falls bank on the normal bank 128 drum kits in case no SoundFonts with bank 127 drum kits are loaded. If a SoundFont has both bank 127 and bank 128 drum kits, the bank 127 kits will be found first. Maybe this needs to be optimized so that if bank 127 defines drum kits, corresponding instruments in bank 128 will be ignored. Hmm...
|[Prev in Thread]||Current Thread||[Next in Thread]|