Skip navigation.
 
mlMore experimenting
FROM : Peter Karlsson
DATE : Sun Dec 19 14:27:06 2004

Hi!

I have just found out that if I send a dump request message from my app:

Kurt Revis MIDI Monitor says that 6 bytes has been sent to port A, and it's
the complete request message.

MIDISPORT 4x4 is not sending or receiving sysex (no red or green lamp or is
blinking)

This happens only after my app is just started. If I send the request
again, everything works. Until the next time I start my app. Any
suggestions?

Peter

Ursprungligt meddelande

> circa 12/15/04 4:42 AM, "Peter Karlsson" <<email_removed>> wrote:
>
> > When I click a button, the code under that button starts a new thread.

In that
> > thread I send a midi sysex request message to one of my synthesizers.
In my
> > MyReadProc I increase a counter every time I receive a sysex midi byte.
This
> > counter is checked for in a while loop in my new thread. And when the
counter
> > have reached the size of the sysex message the while loop is finished
and the
> > thread exits. That's the idea but... It does not work so good. I get
> > [MIDISportLike] sending full buffer messages so it seems that my way of
doing
> > this consumes a lot of cpu power. Can someone please help me to solve
this?
> > Maybe there is a much better way? I must find a way to stop my code
executing
> > until the sysex message is finished. That's the whole problem.
>
> I am not an expert on multi-threaded CoreMIDI client programming, but I

did
> write the driver in question. It sounds like you are trying to receive a
> large sysex message. The driver is trying to avoid sending you every byte

as
> it's received from USB (actually, they arrive in chunks of 1 to 12, but
> that's neither here nor there). It's accumulating bytes into a non-small
> buffer (say for the sake of discussion it's 256 bytes long because I can't
> remember). When the message ends OR the buffer fills, then the driver

sends
> the buffer up to CoreMIDI. In theory, this is supposed to reduce overhead,
> because my assumption is that you can't really do anything with a partial
> sysex message anyway, and packing each byte into a Mach message that gets
> shipped across at least two process barriers didn't seem like a good idea
> for throughput. Despite all this, your concern is that too much CPU is

being
> consumed. So my questions are along the lines of: Is CoreMIDI delivering

to
> you little bitty chunks of message? Might that be because you're only

asking
> for little bitty chunks?
>
>  --
>
>    Pete Gontier
>    http://www.m-audio.com/
>
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Coreaudio-api mailing list      (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/coreaudio-api/<email_removed>
>
> This email sent to <email_removed>
>

Related mailsAuthorDate
No related mails found.