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

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

From: <bugzilla@jessica.w3.org>
Date: Wed, 05 Sep 2012 20:11:05 +0000
Message-Id: <E1T9LwH-0001M9-3S@jessica.w3.org>
To: public-audio@w3.org

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

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