[Bug 18764] MIDI messages don't all have a channel, and status should be part of data.

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

--- Comment #8 from Chris Wilson <cwilso@gmail.com> 2012-09-05 20:11:04 UTC ---
This is actually NOT a good idea, due to how it affects the underlying system
APIs.  MIDI itself is categorized into short messages - three bytes or fewer -
and sysex.  Most system APIs delineate these too - Windows definitely does
(where the short messages are packed into DWORDs for efficient passing to
message handlers), and OSX's CoreMIDI kind of does as well (there is a separate
SendSysex call, although you could technically send sysex in the MIDISend as
well, with some limitations.  CoreMIDI does not delineate receiving Sysex from
short messages, however.)  In Windows, for example, a short message is sent via
a simple MMRESULT midiOutShortMsg(HMIDIOUT hmo, DWORD dwMsg) call; a long
message requires a call to midiOutLongMsg(), which needs a header to be
prepared and populated.

But even more importantly, if you truly are sending variable-length data, you
probably want to put it in a UInt8Array in the arg list for efficiency - except
that's NOT the most efficient way to handle 3-byte (or less) sends, which is
going to end up being 99+% of all MIDI send/receives.

-- 
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 20:11:06 UTC