Re: When is an event not an event?
Re: When is an event not an event?
- Subject: Re: When is an event not an event?
- From: William Stewart <email@hidden>
- Date: Tue, 4 Sep 2007 17:45:51 -0700
On 04/09/2007, at 1:59 PM, Bjorn Roche wrote:
Hey all,
I've been testing my app for working with Audio Unit Plugins, and,
in particular, their native UIs. It seems there are several ways a
user can change the value of a parameter, and I had previously
assumed that they would either do so through my app's interface, or
through a "gesture" a la kAudioUnitEvent_ParameterValueChange,
kAudioUnitEvent_BeginParameterChangeGesture, and
kAudioUnitEvent_EndParameterChangeGesture. This assumption allowed
me to ignore events that are, for example, a side-effect of a
preset recall. Unfortunately, I discovered the user can change
values through the AU GUI without firing
BeginParameterChangeGesture, for example, by typing in a new value
into a text field. GRRRRR!
Sure. There's no guarantee or requirement that the begin/end
notification be sent. Those events don't actually change the value of
a parameter, they just signify that the user has initiated (or ended)
a gesture that may (or may not) lead to the parameter value being
changed.
You can't tell from where the change occurs. Would you consider a
control surface to be the UI, or if a parameter has changed as a
result of a MIDI mapping? These are just different routes to changing
the parameter as you surmise.
As for discriminating whether the parameter has changed as a result
of a preset being set; we haven't discriminated between that source.
So, I don't think you are missing anything there.
With the cocoa view, we explicitly removed the preset menu from the
default UI - this allows the host to exercise a more precise control
and management of how presets are handled. This can include a
bracketing notion around the action of setting a preset (factory or
custom) where you can ignore the parameter change notifications
within that period. Working with this I think you should be able to
solve your problem.
Bill
Maybe there's other stuff I don't know about, too, like MIDI
changes or something. Ultimately, here's the question: how do I
figure out if an event came from the UI? (Why do I care? Well, I'd
like to know, for starters, if a given change is something that
belongs on the Undo list? How do other apps handle this? Am I
missing something?)
thanks for any tips,
bjorn
-----------------------------
Bjorn Roche
XO Wave
Digital Audio Production and Post-Production Software
http://www.xowave.com
http://blog.bjornroche.com
http://myspace.com/xowave
_______________________________________________
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
--
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
________________________________________________________________________
__
_______________________________________________
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