• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CoreMIDI SysEx & MIDIMonitor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreMIDI SysEx & MIDIMonitor


  • Subject: Re: CoreMIDI SysEx & MIDIMonitor
  • From: "David A. Hoatson" <email@hidden>
  • Date: Thu, 31 Aug 2006 11:33:59 -0700
  • Organization: Lynx Studio Technology, Inc.

Well - I guess I spoke too soon.

The sleep(1) fixed the startup issue where the MIDI input thread wasn't completely started before it received bytes.

However I still have the issue where the SysEx message is getting corrupted by the OS.

I now know that if I sent a SysEx message that is too large, the OS will not transmit it properly. I have broken my SysEx message up into 3 byte chunks, and that solved that issue - however it created a new one. If all three bytes of the SysEx message are Zero, then the OS doesn't transmit them at all. Since I am sending 7-bit binary data down to the device, this is simply unacceptable. Each SysEx message must be a specific length or the device will reject it.

From what I can tell, there is simply no way around this. Does anyone from
Apple have any comments about this?  How am I to work around this issue?

I have tried both MIDISend() and MIDISendSysEx().  Both do the same thing.

Thank you,

David A. Hoatson

----- Original Message ----- From: "David A. Hoatson" <email@hidden>
To: <email@hidden>; "Herbie Robinson" <email@hidden>
Sent: Thursday, August 31, 2006 8:27 AM
Subject: Re: CoreMIDI SysEx & MIDIMonitor



Wow, that was it! I did a sleep(1) right after MIDIPortConnectSource() - which I'm guessing allows the thread to startup - and now it works. Thank you! I'm also guessing that the background thread was already started when I launched MIDIMonitor or DP4.5 so that is why it worked without the sleep(1).

Would be nice if there was some event that you could have fire to let you know when the thread is done starting so you don't just waste a bunch of time for no reason. I always hate adding sleep() calls - it seems like such a hack - and it always leads to unreliable code (what if the 'unknown' event you are waiting for takes longer for some reason?).

Thank you,

David A. Hoatson

----- Original Message ----- From: "Herbie Robinson" <email@hidden>
To: <email@hidden>
Sent: Thursday, August 31, 2006 12:57 AM
Subject: Re: CoreMIDI SysEx & MIDIMonitor



>Good call! I didn't think of that. I launched DP4.5 and it did the >same thing as MIDIMonitor. Just having the app open changed how the >whole MIDI subsystem worked (or didn't, as the case may be). Man, I >must be missing something pretty basic here. Something else I need to >do to make sure the MIDIServer is fully running?

It's possible the "spy" has something to do with it, but I'm kind of skeptical. It only operates on outgoing MIDI data (usually sent by applications), not on data that comes into the computer via other MIDI interfaces. If you're only reading input data and not writing, or MIDI Monitor isn't running, it shouldn't be doing anything at all. (What happens if you uncheck everything in the Sources section under "Spy on output to destinations"?)


Right - I tried unchecking everything and it didn't change the behavior. When MIDIMonitor is just launched (not even looking at any streams) my app works correctly.

I assume you are calling MIDIClientCreate...

If this is a command line test program, you might want put in a short sleep after doing initialization. I had to sleep for a second to get things to work properly. Most applications are interactive; so, they aren't affected by this. This is especially true if the drivers need to sync a time base with the interface.
--
-*****************************************
** http://www.curbside-recording.com/ **
******************************************
_______________________________________________
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

_______________________________________________ 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

_______________________________________________ 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
  • Follow-Ups:
    • Re: CoreMIDI SysEx & MIDIMonitor
      • From: Kurt Revis <email@hidden>
References: 
 >Audio Units: calling SetParameter from within Process() (From: Artemiy Pavlov <email@hidden>)
 >Re: Audio Units: calling SetParameter from within Process() (From: stiwi <email@hidden>)
 >Re: Audio Units: calling SetParameter from within Process() (From: Artemiy Pavlov <email@hidden>)
 >Re: Audio Units: calling SetParameter from within Process() (From: stiwi <email@hidden>)
 >CoreMIDI SysEx & MIDIMonitor (From: "David A. Hoatson" <email@hidden>)
 >Re: CoreMIDI SysEx & MIDIMonitor (From: Robert Martin <email@hidden>)
 >Re: CoreMIDI SysEx & MIDIMonitor (From: "David A. Hoatson" <email@hidden>)
 >Re: CoreMIDI SysEx & MIDIMonitor (From: Kurt Revis <email@hidden>)
 >Re: CoreMIDI SysEx & MIDIMonitor (From: "David A. Hoatson" <email@hidden>)
 >Re: CoreMIDI SysEx & MIDIMonitor (From: Herbie Robinson <email@hidden>)
 >Re: CoreMIDI SysEx & MIDIMonitor (From: "David A. Hoatson" <email@hidden>)

  • Prev by Date: Re: InputCallbacks and buffer size
  • Next by Date: Re: was: HELP!
  • Previous by thread: Re: CoreMIDI SysEx & MIDIMonitor
  • Next by thread: Re: CoreMIDI SysEx & MIDIMonitor
  • Index(es):
    • Date
    • Thread