RE: Web MIDI polyfill

Building on tops of browser plugins is a nice way to make prototypes but this is not a prolyfill in the sense that:

 

- it’s not immediate (the user will see a broken page the first time and will be asked to download a plugin)


- it’s not cross-platform (no plugin works on iOS and Windows Phone for example)
- it’s not forward compatible (the plugin may break, or not exist for newly popular platforms)
 

This is what the Flash experience reminds us: at some point Flash was installed on 95% of the computers and using Flash to make prolyfills was widely used (async file uploads, animations...). Now, Flash is not available on most mobile platforms and the sites relying on Flash face issues. This is not the kind of model we want to promote in next-web.

 

I still believe we have to believe in our JavaScript-based prolyfill model, which is the only one that can truly be forward compatible. JavaScript is turing complete so there must be another way to support MIDI playback (for exemple converting the MIDI file into a MP3 on the go by transcripting the plugin using Emscripten).

 

Nice achievement anyway ;-)

François

 

 

 


De : Brian Kardell
Envoyé : ‎13‎ ‎décembre‎ ‎2012 ‎06‎:‎47
À : Innovimax W3C
Cc : public-nextweb@w3.org
Objet : Re: Web MIDI polyfill



On Wed, Dec 12, 2012 at 12:04 PM, Innovimax W3C <innovimax+w3c@gmail.com> wrote:


Forwarded with permission from Chris Wilson



FYI




Mohamed



---------- Forwarded message ----------
From: Chris Wilson <cwilso@google.com>
Date: Tue, Dec 11, 2012 at 2:13 AM
Subject: Web MIDI polyfill
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





-- 
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 9 52 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr

RCS Paris 488.018.631
SARL au capital de 10.000 €


Aside from the fact that this uses a plugin this is an excellent example of what I had in mind IMO.  After looking at it though and talking to some people -- I don't think that it uses a plugin really makes it problematic as a prollyfill or anything, so maybe I was thinking too narrow originally... I mean, adopting that strategy actually makes it more practical to fill a whole lot more things.

Thoughts?

-- 
Brian Kardell :: @briankardell :: hitchjs.com

Received on Thursday, 13 December 2012 10:32:38 UTC