diff options
author | Robin Gareus <robin@gareus.org> | 2017-01-31 10:44:07 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-01-31 10:44:07 +0100 |
commit | 2a7ad06e793e3bc335108ce587d1123aaf9989f7 (patch) | |
tree | 6c035a3feb351392898d65c4fb862782773e4c75 /libs/plugins/a-fluidsynth.lv2 | |
parent | 9a13a563d0f2ec7af560321120742249e703e15a (diff) |
fix a-fluidsynth bank select (use MMA style, 14 bit MSB/LSB)
Diffstat (limited to 'libs/plugins/a-fluidsynth.lv2')
-rw-r--r-- | libs/plugins/a-fluidsynth.lv2/a-fluidsynth.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/plugins/a-fluidsynth.lv2/a-fluidsynth.cc b/libs/plugins/a-fluidsynth.lv2/a-fluidsynth.cc index 4637c6be99..0fdb01c86e 100644 --- a/libs/plugins/a-fluidsynth.lv2/a-fluidsynth.cc +++ b/libs/plugins/a-fluidsynth.lv2/a-fluidsynth.cc @@ -327,6 +327,7 @@ instantiate (const LV2_Descriptor* descriptor, fluid_settings_setnum (self->settings, "synth.sample-rate", rate); fluid_settings_setint (self->settings, "synth.parallel-render", 1); fluid_settings_setint (self->settings, "synth.threadsafe-api", 0); + fluid_settings_setstr (self->settings, "synth.midi-bank-select", "mma"); self->synth = new_fluid_synth (self->settings); @@ -763,9 +764,8 @@ mn_file (LV2_Handle instance) pf (" <PatchBank Name=\"Patch Bank %d\">\n", i->first); if (i->second.size() > 0) { pf (" <MIDICommands>\n"); - // this seems wrong (swapped MSB/LSB) but works - double check fluid + ardour. - pf (" <ControlChange Control=\"0\" Value=\"%d\"/>\n", i->first & 127); - pf (" <ControlChange Control=\"32\" Value=\"%d\"/>\n", (i->first >> 8) & 127); + pf (" <ControlChange Control=\"0\" Value=\"%d\"/>\n", (i->first >> 7) & 127); + pf (" <ControlChange Control=\"32\" Value=\"%d\"/>\n", i->first & 127); pf (" </MIDICommands>\n"); pf (" <PatchNameList>\n"); int n = 0; |