summaryrefslogtreecommitdiff
path: root/libs/plugins/a-fluidsynth.lv2/a-fluidsynth.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/plugins/a-fluidsynth.lv2/a-fluidsynth.cc')
-rw-r--r--libs/plugins/a-fluidsynth.lv2/a-fluidsynth.cc5
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) {