Skip to content

Comments

expose MidiFile.readEvent() to parse the event from midi input device#18

Open
garzon wants to merge 1 commit intogasman:masterfrom
garzon:patch-1
Open

expose MidiFile.readEvent() to parse the event from midi input device#18
garzon wants to merge 1 commit intogasman:masterfrom
garzon:patch-1

Conversation

@garzon
Copy link

@garzon garzon commented Sep 15, 2015

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant