Jazz-Soft.net

We make it sound!

Home » Documentation » JZZ.js

JZZ.js: Asynchronous MIDI library

Async MIDI made easy!

Get the latest release at GitHub or at npm.

JZZ.js is a JavaScript MIDI library that hides asynchronous calls behind the developer-friendly chaining syntax.

It requires Jazz-Plugin or jazz-midi, and uses Chrome Web MIDI API and/or Web Audio as a fallback.

It works with Node.js and all major browsers in Linux, MacOS and Windows, with a limited support on iOS and Android devices.

Features

"Getting Started" example

  // load JZZ in HTML:
  <script src="scripts/JZZ.js"></script>
  // or in 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(500).send([0x90,72,127])
       .wait(1000).send([0x90,60,0]).send([0x90,64,0]).send([0x90,67,0]).send([0x90,72,0])
       .and('thank you!');

  ...

See also