W3C home > Mailing lists > Public > public-audio@w3.org > October to December 2012

[Bug 20254] Add code examples

From: <bugzilla@jessica.w3.org>
Date: Mon, 10 Dec 2012 18:02:40 +0000
To: public-audio@w3.org
Message-ID: <bug-20254-5429-QPL8gOpNMw@http.www.w3.org/Bugs/Public/>

--- Comment #6 from Chris Wilson <cwilso@gmail.com> ---
https://dvcs.w3.org/hg/audio/rev/d61cc0adee7e and
https://dvcs.w3.org/hg/audio/rev/39efc30b003f contain these changes:

(In reply to comment #5)
> should be named
> > function onMIDISuccess( midiAccess )


> This is actually a Note On message with 0 velocity, which is equivalent to a
> Note Off message with 64 velocity (if I recall correctly). It's probably
> easier to understand for MIDI newbies to use the actual Note Off message:


> 9.5
> same as 9.1


>From James' email:
>idx and i are the same variable. Change idx to i.


>indexOfPort and index are the same variable. Change index to indexOfPort.


>I  think I'd also rename "event" to "msg" in onMIDIMessage(). Might give newbies a marginally easier time.

NOT done.  The parameter to the onmessage handler is an Event - I want that to
be clear.

>I think that a) the text should include the information that both messages are being sent on channel 0, and b) it might be helpful if you said a bit more about the omitted timestamp.

Done and done.

>As in 9.3, change index to indexOfPort.


>Can we have a sysex example in the official docs please?

Made it clearer that the echo example handles sysex.  Sysex is not a separate
thing in the Web MIDI API - it's just another MIDIEvent, with more bytes. 
(And, obviously, a different status code.)

You are receiving this mail because:
You are the QA Contact for the bug.
Received on Monday, 10 December 2012 18:02:46 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:14 UTC