Re: AU & custom gui, Automation problem
Re: AU & custom gui, Automation problem
- Subject: Re: AU & custom gui, Automation problem
- From: Ben Dyer <email@hidden>
- Date: Sat, 22 Mar 2003 07:48:47 +0000
Hi Nicolas,
I use a custom GUI with the help of Emagic's VSTAU wrapper. I
implemented the following code in the
setParameterAutomated(), beginEdit() and endEdit() VST functions. Seems
to work OK....
void CVST2AUPlugin::setParameterAutomated(long lIdx, float rVal)
{
// Set parameter and call host for automation
setParameter (lIdx, rVal);
float value = GetParameterTranslated (lIdx);
AudioUnitParameter sPar={m_AudioUnit, AudioUnitParameterID (lIdx),
kAudioUnitScope_Global, 0};
AUParameterSet (NULL, NULL, &sPar, value, 0);
}
bool CVST2AUPlugin::beginEdit (long parID)
{
AudioUnitParameter sPar={m_AudioUnit, AudioUnitParameterID (parID),
kAudioUnitScope_Global, 0};
if (m_AudioUnitView)
m_AudioUnitView->TellListener ((AUVParameter&)(sPar),
kAudioUnitCarbonViewEvent_MouseDownInControl, NULL);
return true;
}
/
/-----------------------------------------------------------------------
------
bool CVST2AUPlugin::endEdit (long parID)
{
AudioUnitParameter sPar={m_AudioUnit, AudioUnitParameterID (parID),
kAudioUnitScope_Global, 0};
if (m_AudioUnitView)
m_AudioUnitView->TellListener ((AUVParameter&)(sPar),
kAudioUnitCarbonViewEvent_MouseUpInControl, NULL);
return true;
}
Hope this helps,
Ben.
On Friday, Mar 21, 2003, at 17:18 Europe/London, nicolas bronnec wrote:
>
Hello,
>
>
I'm actually woking on an audio unit wrapper for our vst instrument,
>
and
>
I have some problems about automation in Logic.
>
>
As It's a wrapper, I have a custom gui (based on CarbonViewBase).
>
>
In Logic the automation works fine in 'control mode', then I think I
>
correctly implement the
>
GetParameterList and the GetParameterInfo functions.
>
>
But with our own gui, it doesn't work.
>
As Nikolaus Gerteis suggested on this list, I (try to) notify Logic on
>
the
>
beginning of the automation with a call to TellListener :
>
TellListener( (AUVParameter&)(au_param) ,
>
kAudioUnitCarbonViewEvent_MouseDownInControl , NULL )
>
>
Then during the automation (when I get an audioMasterAutomate from
>
VST) I do some
>
AUParameterSet( 0, 0, &au_param, (Float32) value , 0 ) ;
>
>
And finally
>
TellListener( (AUVParameter&)(au_param) ,
>
kAudioUnitCarbonViewEvent_MouseUpInControl , NULL )
>
>
In fact, I call the first TellListener on the first
>
audioMasterAutomate call, and the second when the mouse
>
is released.
>
>
Is it a correct way to do automation with Logic ? I must have missed
>
something, but I can't find what.
>
>
Any help would be great ! Thanks in advance,
>
>
Best regards,
>
Nicolas
>
ARTURIA
>
_______________________________________________
>
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.
_______________________________________________
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.