This mail declares our intent to implement the Web MIDI API. This is *not* declaring an intent to ship at this time.
Primary emails
eng: Takashi Toyoshima (toyo...@chromium.org), pm de facto: Chris Wilson (cwi...@chromium.org)
Spec
Web MIDI spec is here. More information on MIDI and Web MIDI API implementation (technical details in Blink, security, etc) is here.
Summary
MIDI is a widely-used industry standard protocol used to enable communication between music keyboards, control surfaces such as mixers, DJ controllers, computers and other musical instruments. This API adds support for MIDI devices to the web platform, enabling web applications to list available MIDI input and output devices on the client system, as well as send and receive MIDI messages. Playing a key on a music keyboard triggers an event handler, just like receiving keyboard or mouse events. “MIDI” is often confused with the playback of Standard MIDI Files (.SMFs), which are similar to .MOD files; this feature is unrelated.
This API is a thin layer on top of industry standard MIDI APIs such as CoreMIDI on OSX and iOS, Windows MIDI, and ALSA MIDI. This API confines itself to exposing MIDI devices and message data, analogous to these existing MIDI platform APIs.
In short:
Industry standard protocol for past three decades
Foundational protocol for nearly all consumer and pro music scenarios
Very limited technical scope, thin layer on existing industry standard APIs
Motivation
MIDI is an industry standard protocol used to enable communication between musical controllers, computers, and other musical instruments. It was originally designed in 1983 and was quickly adopted across a wide variety of devices - keyboard controllers, drum machines, synthesizers, effect racks, computers, hardware sequencers, and from then on, an expanding variety of controllers (DJ controllers, basic knob/button/slider controllers, guitar controllers, wind controllers, drum triggers, etc.). Additionally, other non-musical control devices (particularly, professional lighting controllers) have adopted the MIDI standard as a communication protocol.
Today, MIDI is a critically important standard protocol to the music industry. It is the foundational communication protocol used in professional, prosumer and consumer studios and workflows, allowing a large variety of common control surfaces to be used to control audio and music software such as mixing control surfaces with faders and knobs, DJ control surfaces and more, in addition to interconnecting musical instruments like keyboards, guitars, drums, effects units and other equipment . It is supported and used by nearly every music production application, from professional applications down to Apple’s GarageBand included with every Mac, and is the foundation of interoperability across music devices in studios, from consumer to pro. MIDI is supported on Apple’s iOS (more than 400 MIDI applications in the App Store), along with every other major operating system (OSX, Windows, Linux), and MIDI controllers are available locally nationwide at consumer-focused stores like Best Buy and the Apple Stores, as well as music-focused stores like Guitar Center.
The difference between tapping out melodies on a computer keyboard and playing a weighted 88-key piano controller represents the gap between web toy and a serious music production tool to a large audience of musicians, sound designers and audio engineers, from amateurs to pros.
Compatibility Risk
The specification is a stable working draft (first published working draft was approximately six months ago), and the working group considers it ready for implementation experience. It has been implemented as a plugin-based polyfill that works across browsers on OSX and Windows, but there are no other current native implementations, and no other browser has yet declared their intent to implement. Mozilla has made positive comments about the specification (see links in chromestatus.com), but is not focused on in-depth review of the MIDI API right now; they are very focused on Web Audio as a higher priority (which is natural). Web Audio implementations in general turn up the need for MIDI support, so we expect this to be more interesting as they work through their Web Audio implementation.
This API has a very small footprint- four object types - and directly maps onto existing APIs that have been successful in the industry for decades, and requires few changes in the Blink code (see linked Web MIDI doc referenced above for technical details). Although small changes to the specification may happen in the future (we expect implementation to turn up some changes, for example), the overall API design is unlikely to change dramatically, and there is just not that much to change. Because this API is based on well-established industry standards, we fully expect this API to be compatibly and interoperably implemented.
Without this API, MIDI devices can only be accessed on the web platform via plugins such as the Jazz plugin, or general-purpose platform plugins that support MIDI such as Adobe Director or Java, but cannot access MIDI devices without a plugin.
This API does not directly interoperate with existing APIs, so should not cause issues outside its own area, both in terms of the JavaScript API’s interaction with other features, and in the underlying Blink/Chromium implementation (for example, the code does not share or interfere with the Web Audio implementation).
Yes, there is a row on the feature dashboard. (Search for “MIDI”.)
We are not requesting simultaneous permission to ship.
This feature will be implemented behind a runtime flag in order to get early developer experience. We will send an Intent to Ship email when we believe it is ready to enable by default.
Hey Emil-those are (and were) all great questions. We specifically tried to address them with this intent; there are more detailed answers to them are in the email or the linked Web MIDI doc, but as a short version,
- [other browsers] No other browser has declared their intent to implement at this point (I'm obviously discounting the NPAPI-/ActiveX-based prollyfill that I maintain), but MIDI is fairly tightly (though not completely) bound in scenarios to Web Audio support - that is, once you have a powerful audio subsystem, you really want MIDI controllers to control it. I would classify Mozilla (the only other engine that has Web Audio support under way) as "unopposed, but not directly reviewing" - which is natural, as they're highly focused on Web Audio right now. This Intent to Implement is to gather the developer experience we need; the decision to ship or not will be made afterward as a separate Intent to Ship, and I expect we'd have better information on other browsers as well as developer experience to make that decision.
- [meaning for large subset of users] Yes. The MIDI market is huge (see doc), and MIDI devices are sold in Best Buy, the Apple store, and other consumer places, as well as music-focused stores like Guitar Center. MIDI is the foundational communications protocol for the music industry.
Unless I am mistaken, the Web MIDI API is totally unrelated to playing .mid files. Correct?(I took a peek at the document, but I just want to make sure I understand correctly)So, while apparently unrelated, if anything regarding MIDI is implemented, I think the playback of .mid files is a much much higher priority.
Hi Yosef,Thank you for being interested in Web MIDI API.
Actually, we already started to implement it for Linux and Chrome OS. In the trunk build, you can see the flag in chrome://flags, and output devices work behind the flag. Input devices is coming soon.