Re: kAudioUnitProperty_HostCallbacks
Re: kAudioUnitProperty_HostCallbacks
- Subject: Re: kAudioUnitProperty_HostCallbacks
- From: James Coker <email@hidden>
- Date: Thu, 25 Mar 2004 10:30:15 -0700
On Mar 25, 2004, at 6:26 AM, Robert Grant wrote:
I'm trying to host an AU that relies on getting at least the beat and
tempo, and potentially the musical time and location - and needless to
say it's not happy, but I'm pretty stumped on how to make it happy.
So I'm going to start a thread to hopefully get the info I need and
I'll post a summary to the Swiki
HostCallback_GetBeatAndTempo.outCurrentBeat - tells the AU the current
beat number where zero is the first beat of the song and the beat
number increments until playback is stopped. The increment happens on
the next beat and between beats the last beat number is returned? So
it's
Beat - 0
0
0
.
.
0
Beat - 1
1
.
.
1
Beat - 2
etc
Is that correct? Or should I be using the fractional beat value to
indicate how far past the beat I am?
Use fractional beats, the more accurate the better. Note that this is
really only possible if your tempo
clock is itself running in the render callback. Currently, AU's must
watch the current beat value to detect
transport changes (start/stop), so if current beat is the same from one
AU Render slice to the next, the
plugin may guess that the transport has stopped. Some developers have
asked for direct transport
change notification from the host to the plugin, I am in that camp also.
HostCallback_GetMusicalTimeLocation.outCurrentMeasureDownBeat - in a
simple case whether the time-signature doesn't change this would be:
( (UInt32)outCurrentBeat / (UInt32)outTimeSig_Numerator ) *
(UInt32)outTimeSig_Numerator
Yes, I think that is what I'm using.
Cheers,
Jim
_______________________________________________
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.