diff options
author | Robin Gareus <robin@gareus.org> | 2017-01-31 00:43:43 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-01-31 00:43:43 +0100 |
commit | 9a13a563d0f2ec7af560321120742249e703e15a (patch) | |
tree | df260051555c28cf09b6e05ea049ed310da0b9df /libs/plugins | |
parent | 1c3b421a02b4a7686d5d5d98df7ce545a626525c (diff) |
fix a-fluidsynth midnam bank select
Diffstat (limited to 'libs/plugins')
-rw-r--r-- | libs/plugins/a-fluidsynth.lv2/a-fluidsynth.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/plugins/a-fluidsynth.lv2/a-fluidsynth.cc b/libs/plugins/a-fluidsynth.lv2/a-fluidsynth.cc index fa1929ba02..4637c6be99 100644 --- a/libs/plugins/a-fluidsynth.lv2/a-fluidsynth.cc +++ b/libs/plugins/a-fluidsynth.lv2/a-fluidsynth.cc @@ -762,6 +762,11 @@ mn_file (LV2_Handle instance) for (BPMap::const_iterator i = ps.begin (); i != ps.end (); ++i, ++bn) { 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 (" </MIDICommands>\n"); pf (" <PatchNameList>\n"); int n = 0; for (BPList::const_iterator j = i->second.begin(); j != i->second.end(); ++j, ++n) { |