From b5623cb9c2daab2d454110c7bfe3d918d1a7b7b9 Mon Sep 17 00:00:00 2001 From: josc146 Date: Sun, 10 Dec 2023 22:32:06 +0800 Subject: [PATCH] fix generation instrumentType --- frontend/src/pages/AudiotrackManager/AudiotrackEditor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/AudiotrackManager/AudiotrackEditor.tsx b/frontend/src/pages/AudiotrackManager/AudiotrackEditor.tsx index 23728c6..28d6701 100644 --- a/frontend/src/pages/AudiotrackManager/AudiotrackEditor.tsx +++ b/frontend/src/pages/AudiotrackManager/AudiotrackEditor.tsx @@ -92,7 +92,7 @@ const velocityToBin = (velocity: number) => { const midiMessageToToken = (msg: MidiMessage) => { if (msg.messageType === 'NoteOn' || msg.messageType === 'NoteOff') { - const instrument = InstrumentTypeTokenMap[commonStore.instrumentType]; + const instrument = InstrumentTypeTokenMap[msg.instrument]; const note = msg.note.toString(16); const velocity = velocityToBin(msg.velocity).toString(16); return `${instrument}:${note}:${velocity} `;