Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a CLI argument to enable MPE for a session #7871

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/surge-xt/cli/cli-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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<std::unique_ptr<juce::MidiInput>> midiInputs;

Expand Down