Package Exports
- jzz
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jzz) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
JZZ: Asynchronous MIDI Library
JZZ.js allows sending, receiving and playing MIDI messages in Node.js and all major browsers in Linux, MacOS and Windows.
It requires jazz-midi or Jazz-Plugin, and uses Chrome Web MIDI API and/or Web Audio as a fallback.
Limited support is available on iOS and Android devices.
Node.js module: npm install jzz.
Development version and minified scripts are available at Github.
Your questions and comments are welcome here.
You can also support this project.
Usage
Node.js
var JZZ = require('jzz');
JZZ().or('Cannot start MIDI engine!')
.openMidiOut().or('Cannot open MIDI Out port!')
.wait(500).send([0x90,60,127])
.wait(500).send([0x90,64,127])
.wait(500).send([0x90,67,127])
.wait(1000).send([0x90,60,0]).send([0x90,64,0]).send([0x90,67,0])
.and('thank you!');HTML
<script src="scripts/JZZ.js"></script>
...
<script><!--
JZZ().or('Cannot start MIDI engine!')
.openMidiOut().or('Cannot open MIDI Out port!')
.wait(500).send([0x90,60,127])
.wait(500).send([0x90,64,127])
.wait(500).send([0x90,67,127])
.wait(1000).send([0x90,60,0]).send([0x90,64,0]).send([0x90,67,0])
.and('thank you!');
--></script>Helpers and shortcuts
All calls below will do the same job:
port.send([0x90,61,127]).wait(500).send([0x80,61,0]); // arrays
port.send(0x90,61,127).wait(500).send(0x80,61,0); // comma-separated
port.send(0x90,'C#5',127).wait(500).send(0x80,'Db5',0); // note names
port.noteOn(0,'C#5',127).wait(500).noteOff(0,'B##4'); // helper functions
port.note(0,'C#5',127,500); // another shortcutMIDI input
JZZ().openMidiIn().or('MIDI-In: Cannot open!')
.and(function(){ console.log('MIDI-In: ', this.name()); })
.connect(function(msg){console.log(msg.toString());})
.wait(10000).close();Check the Getting Started page and the API reference for more information ...











