Re: automation in logic
Re: automation in logic
- Subject: Re: automation in logic
- From: Bill Stewart <email@hidden>
- Date: Sun, 14 Sep 2003 12:52:51 -0700
On Sunday, September 14, 2003, at 09:18 AM, Urs Heckmann wrote:
>
Hi Robert,
>
>
I guess you mean: When mousing the gui, the parameters change but
>
Logic doesn't see this 8-))
>
>
Here's a little summary on the topic:
>
>
When your CarbonControl receives a ClickEvent, send a
>
>
AUCarbonViewBase->TellListener( theAUVParameter,
>
kAudioUnitCarbonViewEvent_MouseDownInControl, NULL);
In Panther to remove this control semantic from the specific view type
(in this case Carbon views)... we've added an additional set of API for
doing this notification:
AUEventListener
It extends the parameter listener services that were available with
Jaguar's CoreAudio, and with the CoreAudio that will be shipped as part
of QuickTime's update to Jaguar, this will also be available on Jaguar.
Details are in AudioUnitUtilities.h (but briefly)
There are four types of events currently that the AUEventListener can
send/receive notifications for:
enum {
kAudioUnitEvent_ParameterValueChange = 0,
kAudioUnitEvent_BeginParameterChangeGesture = 1,
kAudioUnitEvent_EndParameterChangeGesture = 2,
kAudioUnitEvent_PropertyChange = 3
};
The ParameterValueChange is a generalistion of the specific
AUParameterListener (which still works of course as it used to)
- when used with AUEventListener the event data an AudioUnitParameter
(same as AUParameterListener)
Begin and End events have no data associated with them
- this enables us to generalise this event to work not only with
different view types (like Carbon and Cocoa views), but also where an
AU itself can send a notification of these types of events. (This had
been requested from some AU developers because their AU"s themselves
"know" specific events that correspond to these gestures) - thus this
avoids the need for the AU itself to call into the
implementation/private AUCarbonViewBase->TellListener call - that broke
a strict encapsulation/separation of an AU and its View/s
PropertyChange events have an AudioUnitProperty value (similar to
AudioUnitParameter, but the id is a property id)
Theses notification API calls are safe to be called in a
real-time/render thread, and of course the real advantage is that the
listeners to these notifications receive the notification both on the
thread that makes most sense to them, and with the timing/interval
characteristics most applicable to their usage/need of these
notifications - the header contains more information.
Of course, host apps will need to use these new API, so I anticipate
some transition period.
Whether the API can be called/used safely or not will need to be
determined by the user of the API, as it is only available on a system
where the Version 1.3 or greater of AudioToolbox.framework is
installed. We've added some helper classes in the SDK (PublicUtility)
to assist with this - may need to add some more services there, but we
can work through this as people move their code over.
>
Then react on mousing and set the Parameter's value accordingly. Make
>
sure that you don't just use a pointer hack and set the Parameter
>
value internally (like directly calling AUBase::SetParameter() from
>
your gui code, i.e. in VSTGUI enabled plugins). The AU doesn't live
>
that way. It has kinda meta-existence in the System. Hence, sending a
>
Parameter change from GUI to DSP requires you to use AUParameterSet()
>
(in AudioToolbox/AudioUnitUtlilities.h). This way you make sure that
>
Listeners (i.e. host...) know about changes, and it will call
>
AUBase::SetParameter() as well.
The same applies actually if you just call AudioUnitSetParameter (the
AU's public API call) - that *doesn't* utilise the notification
services, thus a UI should change parameter values by calling
AUParameterSet as Urs describes (above and below).
Bill
>
If you use the Base classes, it's sufficient to just change the value
>
of the CarbonControl. Then, AUCarbonViewControl::ControlToParameter()
>
calls AUVParameter::SetValue() which does exactly this stuff for you
>
whenever the value of the CarbonControl changes... (thus, you usually
>
don't have to bother with the APIs of AudioToolbox)
>
>
If mousing is finished, you gotta tell every party involved that it
>
indeed is. Hence
>
>
AUCarbonViewBase->TellListener( theAUVParameter,
>
kAudioUnitCarbonViewEvent_MouseUpInControl, NULL);
>
>
This mechnism is important, because the host needs to know which
>
events belong together so it can smoothly interpolate changes for
>
parameters that ask for such things (Ramp, Hires flags etc.).
>
>
If your control is set up to change multiple parameters at once, you
>
simply call TellListener() for each parameter.
>
>
Hope this helps,
>
>
;) Urs
>
>
Am Sonntag, 14.09.03, um 17:12 Uhr (Europe/Berlin) schrieb Robert
>
Fehse:
>
>
> hi.
>
>
>
> how is the way to write automation data?
>
>
>
> receiving the data from logic works but logic never writes my data.
>
> i call setParameter on parameter change.
>
> do i have to inform the host somehow else?
>
>
>
> robert
>
> _______________________________________________
>
> 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.
>
>
--
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.