Re: Comments on draft MIDI API

Le mardi 26 juin 2012 à 21:43 +0300, Jussi Kalliokoski a écrit :
> I'm also thinking about changing the MIDIMessage into a dictionary as
> Dom originally suggested. Dom, wouldn't it actually mean that for
> example with sendMIDIMessage(MIDIMessage msg); you could use an
> EcmaScript Object that would have those properties instead of it
> having to be an actual instance of a MIDIMessage?

Indeed.

>  I can see added ease of use in this, but then again, it's used in the
> MIDIEvent as well, so it's a bit problematic.

I guess you could define the attribute for MIDIEvent to be object[], and
then define in the prose that the said objects have a structure that
matches the MIDIMessage dictionary. 

It might be worth checking with public-script-coord@w3.org (where WebIDL
is defined) whether there is a better way.

Dom

> [1] https://dvcs.w3.org/hg/audio/rev/563ce3b94a68
> 

Received on Wednesday, 27 June 2012 06:19:09 UTC