Skip to content

RangerMauve/web-midi-note-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 released
	note: 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 = require("web-midi-note-stream");
var midiStream = require('web-midi');
var stdout = require("stdout");

// Listen to all button presses, parse them, log to console
midiStream("Launchpad")
	.pipe(noteStream())
	.pipe(stdout("Note:"));

About

Takes in a stream of midi events and outputs objects with note/frequency information

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published