For the midi keyboard previously mentioned in yesterday's post/question --
Arturia MiniLab mkII;
http://downloads.arturia.com/products/minilab-mkII/manual/MiniLabmkII_Manual_1_0_7_EN.pdf

When this keyboard is powered on, it defaults to Keyboard Preset 1 which is
a special configuration for Arturia's Analog Lab software.  Note that
'Preset' in the context of the keyboard is separate from the soundFont
'Preset', so I will just call this the 'mode'.  In that default 'mode' 1,
when one attempts to change the 'Midi Channel' by pressing the Shift button
and one of the keys starting with the lower F, this does not change the
midi channel, at least as reported by FluidSynth's debug output (key
up/down mesages).  This is the main reason I was looking for some
alternative way to change the SoundFont preset from the midi controller.

However, by selecting one of the other modes 2-8, at least as they are
defined by default, the midi channel can be changed.  The modes on the
keyboard are selected by pressing the Shift button and one of the pads.

Now that I have identified a way to change midi channel from the keyboard,
it is easy enough to use the 'select' command to configure a different
soundfont preset for each of the 16 available channels. In the fluidsynth
shell/command file, this looks like;


load "/usr/share/sounds/sf2/FluidR3_GM.sf2"

# select <channel 0..16> <soundfont_id 1..n> <bank 0,8,9,16,128>
<program/soundfont_preset 0..127>

select 0 1 0 0 #Yamaha Grand Piano

select 1 1 0 28 #Electric Piano

select 2 1 0 18 #Rock Organ

select 3 1 0 40 #Violin

select 4 1 0 42 #Cello

select 5 1 0 19 #Church Organ

select 6 1 0 9 #Glockenspiel

select 7 1 0 36 #Slap Bass

Now that I have access to 16 presets/voices/'programs', I have become less
interested in trying to modify the soundfont preset, which is apparently
the same as the 'prog'ram in the 'select' or 'num'ber in the 'prog' shell
command.  It might still be interesting to select a wider range of more
than 16 presets using the CC dial, though on the particular controller,
these are sensitive, and it would be fiddly to adjust +/- 1.  I expect that
the concept of tying a CC to the program/preset is at odds with general
midi concepts, even though it should be possible in a piece of software.

I thought replying to my own question might be useful to some other
relative newcomer, and of course save a senior subscriber the trouble of
kindly taking me to school.  I could prepare a PR for the github wiki
material to include this example if others think it is warranted. Akin to:
https://github.com/FluidSynth/fluidsynth/wiki/ExampleCommandLines

Thanks to the members of this community who contributed to development of
this useful, flexible and of course entertaining software, apparently over
almost two decades!
_______________________________________________
fluid-dev mailing list
fluid-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fluid-dev

Reply via email to