13
0

fix a-fluidsynth midnam bank select

This commit is contained in:
Robin Gareus 2017-01-31 00:43:43 +01:00
parent 1c3b421a02
commit 9a13a563d0

View File

@ -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) {