Skip to content

Commit

Permalink
Add a CLI argument for mpe pitch bend range (#7941)
Browse files Browse the repository at this point in the history
With default of (0) mean use surge system default
  • Loading branch information
baconpaul authored Dec 28, 2024
1 parent aaf3c07 commit 26009d8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/surge-xt/cli/cli-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,10 @@ int main(int argc, char **argv)
bool mpeEnable{false};
app.add_flag("--mpe-enable", mpeEnable, "Enable MPE mode on this instance of Surge XT CLI");

int mpeBendRange{0};
app.add_flag("--mpe-pitch-bend-range", mpeBendRange,
"MPE Pitch Bend Range in semitones; 0 for default");

CLI11_PARSE(app, argc, argv);

if (listDevices)
Expand Down Expand Up @@ -352,6 +356,12 @@ int main(int argc, char **argv)
{
LOG(BASIC, "MPE Status : Enabled");
engine->proc->surge->mpeEnabled = true;

if (mpeBendRange > 0)
{
LOG(BASIC, "MPE Bend Range : " << mpeBendRange);
engine->proc->surge->storage.mpePitchBendRange = mpeBendRange;
}
}
else
{
Expand Down

0 comments on commit 26009d8

Please sign in to comment.