W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2012

[Bug 18759] boolean returns from MIDIOutput methods are inappropriately synchronous

From: <bugzilla@jessica.w3.org>
Date: Wed, 05 Sep 2012 17:35:10 +0000
Message-Id: <E1T9JVO-0008Hc-LQ@jessica.w3.org>
To: public-audio@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=18759

--- Comment #3 from Chris Wilson <cwilso@gmail.com> 2012-09-05 17:35:10 UTC ---
1. Do we want to make it explicit in the text that the operation may be
"enqueues a MIDI message", rather than "send"?  (I.e. that the send may not
have completed.)

2. The callback is probably most useful for the sendMIDIMessage form (since
sysex may take a while) - although I do have one scenario that I wanted it for:
 I have a Novation Launchpad
(http://us.novationmusic.com/midi-controllers-digital-dj/launchpad), which is
an 8x8 array of LED-lit buttons, plus 16 additional buttons; it is only USB
1.1, so can only accept a maximum of 
400 messages per second. Because there are 80 LED addresses, it takes 200
milliseconds to update a Launchpad completely.  Obviously, it's kinda cool to
animate it - I've written a Conway's Game of Life implementation
(https://github.com/cwilso/conway/tree/MIDIBridge/WMAS) that interfaces with
the Launchpad - but you don't know when the messages have finished writing, so
it's hard to update appropriately.  I don't just drive the animation as fast as
it will go - you press a button to advance - but if I did, I might end up
overrunning the buffers if I tried to push it faster than 5 updates a second. 
(Probably far less, of course.)

Both OSX and Windows have callbacks to implement this, but the OSX one is ONLY
for Sysex Send calls, so it would be better to have this only on
sendMIDIMessage if we add it.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Wednesday, 5 September 2012 17:35:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 5 September 2012 17:35:18 GMT