W3C home > Mailing lists > Public > public-audio@w3.org > April to June 2012

Re: Comments on draft MIDI API

From: Adam Goode <agoode@google.com>
Date: Tue, 26 Jun 2012 11:44:28 -0400
Message-ID: <CAOf41NmwXBQXt1ZR1zvMa-BYsRxkYAQmpQ90eM8GPM4R1er4eg@mail.gmail.com>
To: Jussi Kalliokoski <jussi.kalliokoski@gmail.com>
Cc: Dominique Hazael-Massieux <dom@w3.org>, public-audio@w3.org
On Tue, Jun 26, 2012 at 11:34 AM, Jussi Kalliokoski <
jussi.kalliokoski@gmail.com> wrote:

> The semantics here may be too strong, maybe SHOULD should be used instead
> of MUST, as forcing the browser to poll on the devices when the OS doesn't
> provide an API for this is a bad idea. And disconnect and connect are not
> applicable to MIDI ports anyway (as in, not direct USB connection).
>
>
>> > And the API does allow for (un)plugging. [1]
>>
>> But only for devices that the app already knows about and keeps track of
>> — or am I missing something? To be more concrete, how would a Web app
>> know that the new MIDI keyboard I just bought just got plugged in?
>>
>
> According to the current API, the only way would be polling. I've been
> thinking of a way to fix this, perhaps an event to MIDIAccess when any
> device is plugged in or out would suffice, but I'm not sure yet.
>
>
>>
>>
Putting the event on MIDIAccess seems like the right thing. Many MIDI
devices are USB, so you'll get that notification. I like the way CoreMIDI
does it on iOS, you get all sorts of notifications for various events:
http://developer.apple.com/library/ios/#documentation/CoreMidi/Reference/MIDIServices_Reference/Reference/reference.html#//apple_ref/doc/c_ref/MIDINotificationMessageID


Adam
Received on Tuesday, 26 June 2012 15:45:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 26 June 2012 15:45:03 GMT