W3C home > Mailing lists > Public > public-audio@w3.org > October to December 2012

Web MIDI polyfill

From: Chris Wilson <cwilso@google.com>
Date: Mon, 10 Dec 2012 17:13:58 -0800
Message-ID: <CAJK2wqVAiSzsFAKQ7jdXs0Mh3aF2PkP9GxCMMpkkCD4AxR0zJg@mail.gmail.com>
To: "public-audio@w3.org" <public-audio@w3.org>
I just wanted to let the group know that I've now also updated my Web MIDI
API polyfill (https://github.com/cwilso/WebMIDIAPIShim), which builds on
top of the Jazz-soft.net NPAPI plugin to add Web MIDI API support on OSX
and Windows (if you install the Jazz plugin v1.2 or later).

The polyfill uses the current syntax of the API in the specification; I
also added multiple simultaneous I/O support (the polyfill could previously
only support one input and one output at a time), sending and receiving
long messages (system exclusive), support for timestamps (on send and
receive), albeit of course with only setTimeout-level precision (it is a
JavaScript polyfill, after all), and (I think) proper event dispatching
(i.e. you can use addEventListener as well as onmessage).

In short - you should be able to include this polyfill in a project, and it
will add Web MIDI support to your browser.  (Caveat: have not thoroughly
tested the cross-browser implementation; I know CustomEvent is not there on
IE<10, which would be an issue.)

Happy to take further suggestions.

-Chris
Received on Tuesday, 11 December 2012 01:14:28 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:14 UTC