WebMidi.js
Friendly wrapper over the Web MIDI API for sending and receiving MIDI in the browser and Node.
| Language | JavaScript |
|---|---|
| Category | MIDI tools |
| License | Apache-2.0 |
| Platforms | Web macOS Windows Linux |
| Install | npm install webmidi |
| First released | 2015 |
| Maintained | Yes |
| Links | Website · Source |
Strengths
- High-level helpers like playNote() and per-event listeners
- Handles note names, control change, pitch bend and SysEx
- Well-documented, actively maintained
Limitations
- Underlying Web MIDI API is unsupported in Safari and (by default) Firefox
- v3 API is a breaking rewrite vs older v2 tutorials
Best for
Building browser apps that talk to hardware or virtual MIDI instruments.
Minimal example
import { WebMidi } from "webmidi";
await WebMidi.enable();
const out = WebMidi.outputs[0];
out.playNote("C4");