From 07ef0ed30c242f9c0d2b156a6557c683f7586cba Mon Sep 17 00:00:00 2001 From: "[poww10s]" <[theironminer@gmail.com]> Date: Wed, 2 Sep 2020 21:51:41 -0400 Subject: [PATCH] add correct file input to MIDIComponent --- src/components/MidiComponent.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/components/MidiComponent.js b/src/components/MidiComponent.js index 0833263..04cceec 100644 --- a/src/components/MidiComponent.js +++ b/src/components/MidiComponent.js @@ -20,6 +20,15 @@ function recieveMIDIMessage(message) { } +function loadSysex(input) { + let file = input.current.files[0]; + console.log(file); +} + +function dumpBufferfromSysexFile() { + +} + function MIDIComponent () { navigator.requestMIDIAccess({sysex: true}).then(onMIDISuccess, onMIDIFailure); @@ -27,9 +36,7 @@ function MIDIComponent () { const handleInput = (event) => { event.preventDefault(); - alert( - `Selected file - ${fileInput.current.files[0].name}` - ); + loadSysex(fileInput); } return( @@ -44,10 +51,6 @@ function MIDIComponent () { ); -} - -function parseSysexFile() { - } export default MIDIComponent; \ No newline at end of file