Attached is a patch for 4 SysEx messages. This allow Fluidsynth to automatically switch
between GM, GS, XG mode on the fly, without having to restart, that is. Often a
"reset" sysex is sent at beginning of a midi file, but not always.
Sys-Ex "reset" messages:
myweb.tiscali.co.uk/mikesmusic/my_technical_articles2.html#sysex
1. GM Reset (understood by every GM-compatible instrument)
Sys-Ex String: F0 7E 7F 09 01 F7
2. Roland GS Reset (Understood by all Roland GS instruments)
Sys-Ex String: F0 41 10 42 12 40 00 7F 00 41 F7
3. Yamaha XG reset (Understood by all Yamaha XG instruments)
Sys-Ex String: F0 43 10 4C 00 00 7E 00 F7
About master volume:
home.roadrunner.com/~jgglatt/tech/midispec/mastrvol.htm
Master Volume SysEx: 0xF0 0x7F 0x7F 0x04 0x01 0xLL 0xMM 0xF7
where (0xLL=LSB, 0xMM=MSB), where 7F 7F is maximum volume.
My patch ignores LSB (LSB=0), simply takes the MSB (7-bit, max value 127)
devide by 12.70 to get the range of [0.0 - 10.0].
-----
In adding SysEx handler for master volume adjustment ("gain" in Fluidsynth), I found a
few inconsitencies regarding "gain":
-g, --gain
Set the master gain [0< gain< 10, default = 0.2]
which sets fluidsynth settings of:
synth.gain FLOAT [min=0.000, max=10.000, def=0.200] REALTIME
Master synthesizer gain.
While the fluidsynth command shell and manual page have:
gain value
Set the master gain (0< gain< 5)
but the shell-command handler fluid_handle_gain() doesn't try to scale it in
anyway to 10.0. Any reason for that? Or, it's just an oversight (in previous
changes).
In this patch, I go ahead and change all references regarding maximum "gain"
from 5 to 10. Let me know if those need to be left alone.
Jimmy
_______________________________________________
fluid-dev mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/fluid-dev