Re: Vendor implementation status: Web MIDI API

I think that is an important question to answer; however, I also think that
it's a relatively complex one to answer, as of course you could satisfy the
needs of any data transport mechanism with a generic
"enumerateDevices/sendDataToDevice/readDataFromDevice" API.  Filtering the
devices to just interesting ones for any given purpose (such as musical
controllers/producers) would be a challenging one, however - as you'd need
to somehow filter out USB-MIDI devices (and serial or parallel devices with
MIDI drivers) from all other devices.  Then, on top of that, you'd have to
handle your own stream-to-MIDI-message conversion; that's not "hard" (I
just had to implement it in the polyfill, as the plugin sometimes gives
back multiple messages), but it is work.

Most importantly, though, I think such a more generic API would need to be
much more complete and specific for the other "generic" purposes - for
example, to properly support arbitrary USB devices, you need to expose
different transfer types (isochronous, bulk, interrupt), vendor/product
ids, etc.  (see the Chrome Apps documentation:
https://developer.chrome.com/trunk/apps/app_hardware.html - and they don't
even allow enumeration, much less filtering by USB-MIDI support.)  This
would make a "generic" API actually fairly specific, and it begins to seem
like boiling the ocean to me.  (Even before mentioning the security
concerns of an unbounded arbitrary device communication API are far, far
scarier.)

-C

On Tue, Jan 22, 2013 at 9:32 AM, Olivier Thereaux <
Olivier.Thereaux@bbc.co.uk> wrote:

>
> On 22/01/2013 17:30, "Chris Wilson" <cwilso@google.com> wrote:
>
> >That whole thread is MORE than worth a look; there was pretty strong
> >questioning on that list whether MIDI support in the web platform was
> >worthwhile.  I will be working on responding to these concerns of course.
>
> Definitely.
>
> One of the interesting question - for which the answer could help us
> tailor how we talk about the API - is "why couldn't this be done with a
> more generic API".
>
> Olivier
>
>
>
> -----------------------------
> http://www.bbc.co.uk
> This e-mail (and any attachments) is confidential and
> may contain personal views which are not the views of the BBC unless
> specifically stated.
> If you have received it in
> error, please delete it from your system.
> Do not use, copy or disclose the
> information in any way nor act in reliance on it and notify the sender
> immediately.
> Please note that the BBC monitors e-mails
> sent or received.
> Further communication will signify your consent to
> this.
> -----------------------------
>

Received on Tuesday, 22 January 2013 17:58:34 UTC