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 }