[Bug 20254] Add code examples

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20254

--- 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 )

Done.

> 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:

Done.

> 9.5
> same as 9.1

Done.

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

Done.

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

Done.

>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.

>9.4
>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.

Done.

>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