From 52ce45a505767acf5ae18c12ec24b1c6c3db7229 Mon Sep 17 00:00:00 2001 From: Marc Sabat Date: Thu, 11 Apr 2024 22:38:55 +0200 Subject: [PATCH] fixed so any index responds --- src/App.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/App.vue b/src/App.vue index 55630292..cb489218 100644 --- a/src/App.vue +++ b/src/App.vue @@ -85,6 +85,12 @@ function midiNoteOn(index: number, rawAttack?: number, channel?: number) { } let frequency = scale.frequencies[index] + + // if index out of range calculate frequency directly + if (index < 0 || index > 127) { + frequency = scale.getFrequency(index) + } + if (!midi.velocityOn) { rawAttack = 80 }