jasmid
jasmid copied to clipboard
expose MidiFile.readEvent() to parse the event from midi input device
I think this method is reusable and it just looks like a public static method. So I expose it. It can be used to parse the raw midi message. :)
Usage: var data = Stream(asciiArray2BinaryString([0x50, 0x90, 0x60, 0x60])); // 0x50 is a dummy placeholder, corresponding to deltatime var event = MidiFile().readEvent(data); console.log(event.subtype); // 'noteOn'