• 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: problem connecting MIDI I/F after app launch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreMIDI: problem connecting MIDI I/F after app launch


  • Subject: Re: CoreMIDI: problem connecting MIDI I/F after app launch
  • From: Hidetomo Katsura <email@hidden>
  • Date: Tue, 9 Mar 2004 21:17:32 -0800

a friend of mine just tested his MIDI interface with AppleUsbMidiDriver, and he told me that the problem did not happen.

so i guess this is a problem with my m-audio midisport 2x2 interface and version 3.1 driver. :(

the missing very first MIDI-in message may also be an interface/driver specific problem. i guess i need a better interface/driver. :)

katsura

On Mar 9, 2004, at 2:39 PM, Hidetomo Katsura wrote:

my app currently keeps the indexes of the MIDI source and destination in the prefs. and it checks if the indexes are still within the current number of sources and destinations at app launch. and if i connect the MIDI interface after app launch, and select the source and destination in my app's MIDI setup panel, MIDISendSysex() doesn't send anything even though it returns noErr and the completion proc gets "complete" TRUE.

i have extracted the MIDI related code from my app and wrote a tiny command-line test app, and it works fine if it doesn't call (#if 0) MIDIGetNumberOfSources/MIDIGetNumberOfDestinations before MIDIClientCreate/MIDIInputPortCreate/.../MIDISendSysex, but it doesn't work if it calls (#if 1) MIDIGetNumberOfSources/MIDIGetNumberOfDestinations. CoreMIDI APIs return noErr and ports and destination are non-NULL but the MIDI out indicator of my MIDI interface (midisport 2x2) doesn't blink.

i also noticed that the MIDIInPortThread is already there after calling MIDIGetNumberOfSources/MIDIGetNumberOfDestinations while probably it shouldn't be.

does anybody have any suggestions how to workaround this problem besides connecting the MIDI interface before app launch and not calling MIDIGetNumberOfSources/MIDIGetNumberOfDestinations before other CoreMIDI APIs?

--------
// pseudo code

#if 1
MIDIGetNumberOfSources();
MIDIGetNumberOfDestinations();
#endif

// for debug
printf( "HIT RETURN KEY AFTER CONNECTING MIDI I/F\n" );
getchar();

MIDIClientCreate();

MIDIInputPortCreate();
MIDIGetSource();
MIDIPortConnectSource();

MIDIOutputPortCreate();
MIDIGetDestination();

MIDISendSysex();
--------

regards,
katsura
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: CoreMIDI: problem connecting MIDI I/F after app launch
      • From: Pete Gontier <email@hidden>
References: 
 >CoreMIDI: problem connecting MIDI I/F after app launch (From: Hidetomo Katsura <email@hidden>)

  • Prev by Date: Re: AudioStreamBasicDescription ?
  • Next by Date: Re: CoreMIDI: problem connecting MIDI I/F after app launch
  • Previous by thread: CoreMIDI: problem connecting MIDI I/F after app launch
  • Next by thread: Re: CoreMIDI: problem connecting MIDI I/F after app launch
  • Index(es):
    • Date
    • Thread