diff --git a/use/midi.ts b/use/midi.ts index cb2102ea80..26a79e77a0 100644 --- a/use/midi.ts +++ b/use/midi.ts @@ -43,7 +43,7 @@ export interface MidiInterface { }> forwards: Record> channels: Record - activeNotes: Record + activeNotes: Record guessChords: string[] note: { pitch: number @@ -342,7 +342,7 @@ function noteInOn(ev: NoteMessageEvent) { delete midi.channels[note.channel].activeNotes[note.number] } else { note.velocity = 120 * (ev.note.attack || 1); - midi.channels[note.channel].activeNotes[note.number] = true + midi.channels[note.channel].activeNotes[note.number] = ev.note.attack } midi.note = note; return note;