Vkbd: fix stuck notes when playing fast

The virtual keyboard sends all events with the same timestamp.
When playing fast (mouse-sweep) note-on and note-off will have
the same timestamp.

Since dbd8089fb8, a393f75694 concurrent MIDI are sorted with note-off
first. This correctly handles events when played from the timeline:
 note-on .. note-off|note-on ... note-off

But in case of a MIDI keyboard a note-off event must be send after
the note-on.
This commit is contained in:
Robin Gareus 2022-04-20 19:32:19 +02:00
parent 273824d094
commit a27f1e8cf9
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
1 changed files with 1 additions and 1 deletions

View File

@ -561,7 +561,7 @@ VirtualKeyboardWindow::note_off_event_handler (int note)
ev[0] = MIDI_CMD_NOTE_OFF | channel;
ev[1] = note;
ev[2] = 0;
_session->vkbd_output_port ()->write (ev, 3, 0);
_session->vkbd_output_port ()->write (ev, 3, 1);
}
void