Re: getting host tempo in an Audio Unit
Re: getting host tempo in an Audio Unit
- Subject: Re: getting host tempo in an Audio Unit
- From: Artemiy Pavlov <email@hidden>
- Date: Sun, 27 Aug 2006 14:32:48 +0300
Hello Stiwi!
Thank you *so* much for the help! I really thought it should be a
little more simple, and what you suggested with your last mail works
perfectly!
But now may I ask another simple question?
As I got the tempo value from the host (stored in the HostTempo
variable), I am trying to update my plugin's "Tempo" slider (the
kTempo parameter) with this value:
mAudioUnit->SetParameter( kTempo, HostTempo );
But this doesn't work... What is the right way to update the plugin
view? I have a generic view by the way, no custom UI.
Thanks again Stiwi, I really appreciate and value your help.
With best wishes,
Artemiy.
On 27 Aug 2006, at 11:32 AM, stiwi wrote:
Hi Artemiy,
sorry if i explained it the wrong way around.
Take a look at the AUKernelBase.h file. The kernel gets a pointer
to the parent class and stores it in
a protected member variable named mAudioUnit. If you just add
something like this in your
kernels process() call everything should work .
Float64 bpm;
OSStatus err = mAudioUnit->CallHostBeatAndTempo(NULL, &bpm);
if (err == noErr)
printf("MyKernel::Process %f\n", bpm);
As an example add this to the FilterDemo.cpp Process() call and
take a look at the console output.
Cheers,
stiwi
_______________________________________________
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