W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2013

Seeking guidance on MIDIMessageEvent design, was Fw: [MIDI] bump: Issue 1: MIDIEvent lacking constructor

From: Marcos Caceres <w3c@marcosc.com>
Date: Sun, 14 Apr 2013 21:50:25 +0100
To: www-dom@w3.org
Cc: Chris Wilson <cwilso@google.com>
Message-ID: <2CF20ADC00114ABC96754CF576A05ECC@marcosc.com>
The Web Audio WG is seeking guidance from the DOM WG on the design of an event driven API (Web MIDI API [1]). In particular, the Web MIDI defines a "MIDIMessageEvent" [2] (representing the receipt of a MIDI message resulting from, for example, a key on a synth being pressed).

The question that has come up is if the MIDIMessageEvent should define a constructor (similar to those defined by other *Event) in the platform (see email below).

Your guidance would be greatly appreciated. Please respond to this email or feel free to respond on Github [3] (most of the discussion around this has taken place there). 

Any additional constructive feedback on the design of the API would be greatly appreciated. 

Kind regards,
Marcos 

[1] http://webaudio.github.io/web-midi-api/
[2] http://webaudio.github.io/web-midi-api/#midimessageevent-interface
[3] https://github.com/WebAudio/web-midi-api/issues/1

--
Marcos Caceres



Forwarded message:

> From: Chris Wilson <cwilso@google.com>
> To: public-audio@w3.org <public-audio@w3.org>
> Date: Thursday, 4 April 2013 11:01:01 PM
> Subject: [MIDI] bump: Issue 1: MIDIEvent lacking constructor
> 
> I wanted to get the issues list cleared out if possible: can we reach a conclusion as to whether we need a MIDIEvent constructor for testing purposes, or if
> 
> var event = new Event("message", {data: [...], receivedTime: t });
> 
> suffices, or if we can do something like Marcos suggested:
> 
> [Constructor(DOMString type, optional MIDIEventInit eventInitDict)]
> interface MIDIMessageEvent : Event {
> readonly attribute double receivedTime;
> readonly attribute Uint8Array data;
> }; 
> 
> dictionary MIDIEventInit : EventInit {
> any data;
> };
> 
> 
> Thoughts?
> 
> https://github.com/WebAudio/web-midi-api/issues/1
Received on Sunday, 14 April 2013 20:50:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:20 UTC