• 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
MIDI processing question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MIDI processing question


  • Subject: MIDI processing question
  • From: Kent Clelland <email@hidden>
  • Date: Thu, 1 Apr 2004 13:46:54 +0200

hi doug & bill and everyone else.
I' m experiencing some unexpected behaviour in MIDI processing and before I go coding myself in circles I want to check and see if my expectations aren't maybe a little bit too high ; -)

here is what is happening:

I enable MIDI input to my application like this:

:: MIDIInputPortCreate(mClient,CFSTR("Output"),ReadProc,(void*)this,&mInPor t[inIndex]);

and when I receive MIDIPacketLists in my ReadProc() I am _expecting_ that they are sorted in timestamp - ascending order. although I have not been able to find any solid documentation for or against this, I am simply expecting that a modern operating system driver will naturally place the packets in the list as they arrive and how can a later packet arrive before an earlier one anyway? (huhuh)

HOWEVER, what I am _experiencing_ is that I am in fact recieving events in the MIDIPacketList sometimes in ascending order and sometimes in descending, and I *guess* I will someday maybe get some in an arbitrary order.

so my question is the following: is it wrong for the application programmer to expect the osX midi system to deliver sorted packet lists?
[ or one could formulate it this way ]
is it a mistake that MIDIPacketLists are being delivered with arbitrary timestamp sorting?
[ in which case : ]
whose mistake is it? the USB driver's author?
http://www.motu.com/downloads/MTPMac/usbx_1.22.hqx
or what???

in fact it seems a little silly that if in 90% of the time packets are being recieved in a given timestamp ordering, to then insert application code in the MIDI ReadProc() to (RE)Sort the list because 90% of the time this code will only be overhead. PLUS the method with which these packets are delivered is not the most conducive to sorting... walking the list with MIDIPacketNext()..

some colleagues are of the opinion that because this seems to only happen with one particular driver (at the moment) that the driver "sucks" and there's not alot we can do about it. *HOWEVER* I personally am of the opinion that since the documentation is not 100% comprehensive it is a better idea to field the issue here in this forum, because maybe on the other side of the sargasso they are saying that those music apps "suck" because they don't sort their incoming MIDI ... documentation interpretations can lead to such pithy situations... soooo---> am I missing some documentation? maybe I'm looking in the wrong place?!

so this all boils down to this multiple choice question:

1) it is the MIDI driver's responsibility to deliver MIDI packets in the correct order.
[ OR ]
2) it is the application developer's responsibility to (re)sort all recieved MIDI packets.


Thanks in advance!!!

best from berlin.

|K<


------------------------------------------------------------------
-> Kent Clelland -> Senior Software Developer
-> Native Instruments GmbH -> email@hidden
-> Schlesische Strasse 28 -> http://www.native-instruments.com
-> D-10997 Berlin -> Tel. +49-30-61 10 35-74
-> Germany -> Fax +49-30-61 10 35-35
------------------------------------------------------------------

Out now:

INTAKT - The most powerful loop sampler ever
=> http://www.ni-intakt.com

NI KOMPLETE - Nine instruments in one gigantic package
=> http://www.ni-komplete.com

->>>>>> NATIVE INSTRUMENTS - Generate the Future of Sound! <<<<<<-
_______________________________________________
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.


  • Prev by Date: AudioTimeStamp?
  • Next by Date: AudioDeviceIOProc not called after AudioDeviceStart
  • Previous by thread: Re: AudioTimeStamp?
  • Next by thread: Re: MIDI processing question
  • Index(es):
    • Date
    • Thread