Re: Calling MIDIPacketListAdd from NSTimer
Re: Calling MIDIPacketListAdd from NSTimer
- Subject: Re: Calling MIDIPacketListAdd from NSTimer
- From: Robert Martin <email@hidden>
- Date: Wed, 12 Oct 2011 13:14:22 -0400
No - I don't think you've missed a 'secret' documentation cache. I learned to move my MIDI code from OS9 to OSX by looking at the source code from Kurt Revis' projects at snoize.com - MIDI Monitor, SysEx Librarian, & SnoizeMIDI - great stuff. Peter Yandell also wrote a great MIDI 'toolkit' for his 'MIDI Patchbay' app - the source is also available. The MIDIPacketxxx routines simply manipulate 'midi' bytes stored in structs called MIDIPackets. The important thing to get is what Brian pointed out - that the coreMIDI engine handles the 'exact time' that a message is transmitted - as long as you provide a timestamp and enough 'slop' for it to do its job. In other words, adding a packet to the 'queue' does not in fact 'send' it - coreMIDI sends it for you at the right time - provided it's been added to the queue with a valid timestamp for when it should be sent.
Rob
On Oct 12, 2011, at 12:41 PM, Tom Jeffries wrote:
> … A question for you, Doug, and anybody else- the documentation on MIDI
> packets seems very sparse! The MIDI services reference has sparse
> documentation for MIDIPacketListAdd, MIDIPacketListInit, and
> MIDIPacketNext (I'm still not sure how or why you use MIDIPacketNext,
> by the way) and there are a few source code examples from various
> sources, but it's been pretty much "guess and go" programming trying
> to make this program work. I remember last spring there was a book
> coming out covering CoreAudio, they hadn't finished the MIDI section
> and as far as I've seen the book still hasn't come out.
>
> Is there some piece of solid documentation that I've been missing all
> this time? It seems to me that the fact that you need to call
> MIDISend for each packet and MIDIPacketInit before sending another
> packet should be something that developers can find fairly easily.
> Maybe I've just missed something?
_______________________________________________
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