From dee47e286e0c52e87da8ce3919d5c52c9ff0a31a Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Thu, 28 Nov 2024 18:38:21 -0500 Subject: [PATCH] Add a CLI argument to enable MPE for a session Closes #7856 --- src/surge-xt/cli/cli-main.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/surge-xt/cli/cli-main.cpp b/src/surge-xt/cli/cli-main.cpp index bccfc09ba92..619f3c946a2 100644 --- a/src/surge-xt/cli/cli-main.cpp +++ b/src/surge-xt/cli/cli-main.cpp @@ -317,6 +317,9 @@ int main(int argc, char **argv) "Do not assume stdin and do not poll keyboard for quit or ctrl-d. Useful for " "daemon modes."); + bool mpeEnable{false}; + app.add_flag("--mpe-enable", mpeEnable, "Enable MPE mode on this instance of Surge XT CLI"); + CLI11_PARSE(app, argc, argv); if (listDevices) @@ -345,6 +348,16 @@ int main(int argc, char **argv) } } + if (mpeEnable) + { + LOG(BASIC, "MPE Status : Enabled"); + engine->proc->surge->mpeEnabled = true; + } + else + { + engine->proc->surge->mpeEnabled = false; // the default + } + auto midiDevices = juce::MidiInput::getAvailableDevices(); std::vector> midiInputs;