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
andOutputChannel
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.
I wonder if “future-proof” means MIDI 2.0
Let’s hope “ready for MIDI 2.0” is a 2021 thing and that 2022 gives us practical tools to leverage the protocol which was adopted officially before the pandemic.
Yes, that’s (at least partly) what it means. However, the Web MIDI API (MIDI 1.0) has not officially been adopted yet. MIDI 2.0 on the web is still far… Most of the future-proofing that was done concerns the JavaScript side of things.
Probably not. MIDI 2.0 isn’t very useful in the real world yet because of limited device support.
Whoa! Just realized that the project is supported by Cégep Édouard-Montpetit! Nice to know there’s work done in #MusicTech through a public post-secondary institution!
Technologists often think about the need for private funding. Teachers (especially those who are artists) may take on neat projects without those strings attached.
Cegeps are tuition-free colleges in Quebec offering vocational (“professional”, the “p” at the end) and pre-university programs (“general”, the “G” part). They’ve been going on for over 50 years and are a fascinating part of Quebec’s higher education. (Disclaimer: I work for a nonprofit which provides government-paid services for this sector.)
Cegep teachers rarely have time to do research and there’s little incentive for them to do so.
So, the fact that Jean-Philippe Côté has been working on this project with support from the cegep is great news! I’ll reach out.
Small world! The project has received some funding as part of a research project I spearheaded. Cégep Édouard-Montpetit is one of a few colleges in Quebec to have decent funding and support for research. More info here (in French): https://www.cegepmontpetit.ca/cegep/recherche
WebMidi is really great, good to see it continuing to receive care and attention. I used it on my musical yield curve project https://www.synthtopia.com/content/2019/03/15/data-sonification-with-financial-information-or-the-music-of-the-yield-curve/
Cool! Can I share your project in the new website’s showcase section?
Yes, that would be great
Amazing work. Congrats on (and thank you for) the release @Jean-Philippe and team.
Now, if we could only get Apple on board… 🙁