diff options
author | Chris Xiong <chirs241097@gmail.com> | 2021-11-07 10:56:02 -0500 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2021-11-07 10:56:02 -0500 |
commit | e5863a09dfeef942da8b9459d39badeba3d0620c (patch) | |
tree | f4f7daa83808da2782cc46028bbb065eff778fc4 | |
parent | 9981f1d60352c01ae4373b84acd05460e2aa49d5 (diff) | |
download | QMidiPlayer-e5863a09dfeef942da8b9459d39badeba3d0620c.tar.xz |
Set device id of fluidsynth to 16, as used by most GS synths.
(This should really be a new option...)
Also strip the marker bytes of sysex messages before sending to
Fluidsynth. Someone didn't read the docs before coding.
-rw-r--r-- | core/qmpmidioutfluid.cpp | 2 | ||||
-rw-r--r-- | qmidiplayer-desktop/qmpmainwindow.cpp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/core/qmpmidioutfluid.cpp b/core/qmpmidioutfluid.cpp index 56e71a0..65db825 100644 --- a/core/qmpmidioutfluid.cpp +++ b/core/qmpmidioutfluid.cpp @@ -151,7 +151,7 @@ void qmpMidiOutFluid::basicMessage(uint8_t type, uint8_t p1, uint8_t p2) void qmpMidiOutFluid::extendedMessage(uint32_t length, const char *data) { int rlen = 0; - fluid_synth_sysex(synth, data, int(length), nullptr, &rlen, nullptr, 0); + fluid_synth_sysex(synth, data + 1, int(length) - 2, nullptr, &rlen, nullptr, 0); } void qmpMidiOutFluid::rpnMessage(uint8_t ch, uint16_t type, uint16_t val) { diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp index 1198559..6132234 100644 --- a/qmidiplayer-desktop/qmpmainwindow.cpp +++ b/qmidiplayer-desktop/qmpmainwindow.cpp @@ -441,6 +441,7 @@ void qmpMainWindow::playerSetup(IFluidSettings *fs) }); } fs->setOptStr("synth.midi-bank-select", bsmode.c_str()); + fs->setOptInt("synth.device-id", 0x10); player->sendSysX(settings->getOptionBool("Midi/SendSysEx")); } void qmpMainWindow::loadSoundFont(IFluidSettings *fs) |