web-midi-note-stream
Takes in a stream of midi events and outputs objects with note/frequency information
Uses this table to decode notes.
Expects a web-midi stream to be piped into it,
or chunks of arrays with [status, note, velocity]
.
Outputs an objects that looks like
pressed: Boolean // Whether the note was pressed or releasednote: Number // The note from the midi event [0-127]velocity: Number // The velocity from the midi event [0-127]channel: Number // The channel the note was played in [1-16]frequency: Number // The frequency of the note played
Usage
Install:
npm install --save web-midi-note-stream
Run:
var noteStream = ;var midiStream = ;var stdout = ; // Listen to all button presses, parse them, log to console ;