Developer Jean-Philippe Côté let us know that v3 of the WEBMIDI.js library is now available.

WEBMIDI.js is designed to make it easy for web developers to create browser-based applications that can interact with MIDI instruments.

Version 3 has been rewritten from scratch to make it both future-proof and backwards-compatible. It uses a modern development paradigm and now has its own dedicated website at webmidijs.org.

The library offers numerous new features such as:

  • Support for Node.js. The exact same code can be used in supported browsers and in Node.js.
  • Distribution in 3 flavours: ESM (ECMAScript module for modern browsers), CJS (CommonJS module for Node.js) and IIFE (Immediately Invoked Function Expression for legacy browsers and ad hoc usage).
  • TypeScript Support. Every new release includes a TypeScript definition file for CJS and ESM in the dist directory.
  • New InputChannel and OutputChannel objects. You can now work with a single MIDI channel if that’s appropriate for your needs.
  • New Note object. Makes it easier to work with notes and pass them around from one method to the next.
  • New Message object that allows easier routing of MIDI messages, including the ability to automatically forward inbound MIDI messages to one, or more, outputs.
  • Improved support for system exclusive (sysex) messages.
  • Support for promises, while preserving legacy callback support.
  • Improved support for RPN/NRPN messages.
  • Addition of hundreds of unit tests to make sure the library remains stable at all times.

See the webmidijs site for details or to download.

Audio Synthtopia