Skip to content

Commit

Permalink
fix the virtual keyboard causes the notes E and F to be triggered (#7604
Browse files Browse the repository at this point in the history
)
  • Loading branch information
DevelopMan303 committed Feb 12, 2025
1 parent 65fb51f commit 72dcb4e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/surge-xt/SurgeSynthEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -742,10 +742,14 @@ bool SurgeSynthEditor::keyPressed(const juce::KeyPress &key, juce::Component *or
case Surge::GUI::VKB_OCTAVE_DOWN:
midiKeyboardOctave = std::clamp(midiKeyboardOctave - 1, 0, 9);
keyboard->setKeyPressBaseOctave(midiKeyboardOctave);
// sometimes a note off command get lost
processor.midiKeyboardState.allNotesOff(keyboard->getMidiChannel() );
return true;
case Surge::GUI::VKB_OCTAVE_UP:
midiKeyboardOctave = std::clamp(midiKeyboardOctave + 1, 0, 9);
keyboard->setKeyPressBaseOctave(midiKeyboardOctave);
// sometimes a note off command get lost
processor.midiKeyboardState.allNotesOff(keyboard->getMidiChannel() );
return true;
case Surge::GUI::VKB_VELOCITY_DOWN_10PCT:
midiKeyboardVelocity = std::clamp(midiKeyboardVelocity - 0.1f, 0.f, 1.f);
Expand Down

0 comments on commit 72dcb4e

Please sign in to comment.