Re: CoreMIDI SysEx & MIDIMonitor
Re: CoreMIDI SysEx & MIDIMonitor
- Subject: Re: CoreMIDI SysEx & MIDIMonitor
- From: Kurt Revis <email@hidden>
- Date: Wed, 30 Aug 2006 22:26:02 -0700
On Aug 30, 2006, at 9:53 PM, David A. Hoatson wrote:
The SysEx messages coming from the device can be anywhere from 10
bytes to 320 bytes long. The longest message in this test is 155
bytes and it all comes in one packet if MIDIMonitor is running, and
multiple 3 - 4 byte packets if not (or not at all in the case of
the 1394 device).
OK, that's a little strange. I don't think I've ever seen a single
message that long -- it seems weird for the driver to hold onto it
for that long.
But I'm usually wrong at least five times a day, so just in case,
you might want to remove the "spy" driver (probably in ~/Library/
Audio/MIDI Drivers/MIDI Monitor.plugin), quit all apps that use
CoreMIDI (or maybe even restart), and try again. Note that MIDI
Monitor will reinstall it when it launches.
The MIDI Monitor.plugin wasn't there on my system.
Look in the Library directory in your home directory, not in the top-
level Library directory.
I laughed when I saw Echo.cpp was the only example code.
Well, come to think of it, what does it do if you run it? (As the
only running MIDI app, and then concurrently with your app?) It's
about as simple as a MIDI receiving program can get. I think there
are a couple of lines you can uncomment to make it print all the data
that comes in, not just note events.
Just to give more info: I am sending my SysEx messages to the
destination with MIDISend() instead of MIDISendSysEx(). Seemed
like to me that shouldn't matter - and I do see that my messages do
get transmitted just fine.
You're fine. MIDISendSysEx() is just a convenience.
I'm really just guessing at what might be going on, so any help
that you can give is much appreciated.
At this point I'd try to pare down your program as small as you can
and see if your problem keeps happening. Remove the sending side,
that seems to work fine, just worry about receiving. Do as little as
you can in your ReadProc, just stick some printf's in to see what
data you're getting.
You're calling a method on a CByteQueue (which I assume is your own
class) -- can that potentially block for a while? You do know that
the ReadProc is happening in a separate thread, and you can't receive
any more data until your ReadProc returns, right? It almost sounds
like you're blocking CoreMIDI from sending you more data, under
certain circumstances. But what that would have to do with having
other MIDI apps running is entirely beyond me.
In any case, if you can distill this down enough, maybe you can send
it around for others to look at.
Rest assured that this is definitely a weird case, not something that
typically happens... the only reason we get away with having so
little sample code is that the API is straightforward and usually
just works!
--
Kurt Revis
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden