Another way of doing this that seems a little closer to what you'd expect, for example, from a GM SoundFont, is to use a MIDI CC as an instrument selector. The problem with keyswitches is that you're inherently limited by your need to use most of the keyboard for actually playing the instrument. Using a CC also gives you 128 values to select between 128 GM instruments, which works out nicely.
Using a CC is pretty simple (I'm going to use CC3, because it's undefined):
- Code: Select all
<global>
//Settings that apply to all your instruments
<master> //Instrument 1, selected by setting CC3 to 0
locc3=0 hicc3=0
//...
<master> //Instrument 2, selected by setting CC3 to 1
locc3=1 hicc3=1
//...
//etc...
LinuxSampler also seems to support the
- Code: Select all
lochan
and
- Code: Select all
hichan
opcodes for selecting samples based on MIDI channel. I'm not quite sure how one sets up LinuxSampler to allow multi-channel MIDI input to a single instrument, but that would also be a very clean way to select between 16 instruments. Unfortunately, LinuxSampler doesn't support the program change opcodes, so you can't directly use MIDI program change messages.