Re: au midi/control output in panther
Re: au midi/control output in panther
- Subject: Re: au midi/control output in panther
- From: William Stewart <email@hidden>
- Date: Thu, 6 Nov 2003 00:17:12 +0100
On 05/11/2003, at 9:48 PM, Chris Reed wrote:
On Nov 5, 2003, at 1:37 PM, William Stewart wrote:
We're looking at getting an example of this - but will need a bit of
time...
It isn't sufficient just to set the midi type ID. You'll also need to
set a sample rate so that (with the numFrames argument that is passed
in with AudioUnitRender), the AU can translate/interpret the sample
offset time stamps (which is how the time stamp in the MIDI Packets
are to be formatted) into some real time value if needed... The same
semantics as audio connections applies (ie. the format matches - in
this case 'midi' AND the sample rate)...
I know this is scant information, we'll get something available
soon=ish... Happy to answer questions if people are wanting to look
at this and explore it before we get too of course
Can you describe the relationship between the sample rate, the number
of frames, and the time stamps in more detail? (With an example,
please.) The header comments and your description above aren't
entirely clear.
Does this mean that, for instance, I can set the sample rate on a MIDI
stream to, say, 44.1 kHz. Now say the time stamp for the first MIDI
packet is 100 (are the time stamps offset from the beginning of the
buffer?). So does that mean the actual time is buffer start +
100/44100? How does the numFrames fit into this equation?
Yes (the time stamp of the midi packet is a sample offset). The Time
Stamp that is supplied for AudioUnitRender describes the time of the
first sample of the buffer to be produced.
numFrames (as with audio) is used to calculate the duration (in seconds
for instance) of a buffer that you're given to render - but you can
only do this if you know the sample rate.
Bill
thanks
-chris
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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.