Vkeybd: force release notes on panic
If key(s) are still being pressed, a key-repeat will re-trigger the most recently pressed note (depending on keyboard settings).
This commit is contained in:
parent
b228dce1c1
commit
b942eecc9c
@ -1044,6 +1044,13 @@ APianoKeyboard::sustain_release ()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
APianoKeyboard::reset ()
|
||||
{
|
||||
sustain_release ();
|
||||
stop_unsustained_notes ();
|
||||
}
|
||||
|
||||
void
|
||||
APianoKeyboard::set_note_on (int note)
|
||||
{
|
||||
|
@ -52,6 +52,7 @@ public:
|
||||
|
||||
void set_note_on (int note);
|
||||
void set_note_off (int note);
|
||||
void reset ();
|
||||
|
||||
void set_grand_piano_highlight (bool enabled);
|
||||
void set_annotate_layout (bool enabled);
|
||||
|
@ -398,6 +398,7 @@ VirtualKeyboardWindow::update_octave_range ()
|
||||
bool
|
||||
VirtualKeyboardWindow::send_panic_message (GdkEventButton*)
|
||||
{
|
||||
_piano.reset ();
|
||||
uint8_t channel = PBD::atoi (_midi_channel.get_text ()) - 1;
|
||||
uint8_t ev[3];
|
||||
ev[0] = MIDI_CMD_CONTROL | channel;
|
||||
|
Loading…
Reference in New Issue
Block a user