From 1f283a86fce0e05711515a8bb1f09daf685d1d54 Mon Sep 17 00:00:00 2001 From: Lumi Pakkanen Date: Tue, 2 May 2023 12:22:53 +0300 Subject: [PATCH] Prevent multiple notes on a single virtual key ref #394 --- src/components/VirtualKeyboardKey.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/VirtualKeyboardKey.vue b/src/components/VirtualKeyboardKey.vue index 64334001..dac9aed4 100644 --- a/src/components/VirtualKeyboardKey.vue +++ b/src/components/VirtualKeyboardKey.vue @@ -19,6 +19,9 @@ let noteOff: NoteOff | null = null; function start() { active.value = true; + if (noteOff !== null) { + noteOff(); + } noteOff = props.noteOn(); }