Skip to content

Commit

Permalink
fixed so any index responds
Browse files Browse the repository at this point in the history
  • Loading branch information
000masa000 committed Apr 11, 2024
1 parent a371afe commit 52ce45a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 52ce45a

Please sign in to comment.