add correct file input to MIDIComponent
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user