Understanding Parameter Handling & Constraints using a custom UI
Understanding Parameter Handling & Constraints using a custom UI
- Subject: Understanding Parameter Handling & Constraints using a custom UI
- From: Stefan Huber <email@hidden>
- Date: Fri, 14 Jan 2011 01:22:29 +0100
Hi,
I have a few questions regarding the parameter handling with Audio Units.
If I use a generic UI, everything seems pretty clear. I set the min and max values (etc.) and use the GetParameterInfo() method to "tell" the Host their properties. The generic UI is limited to these values.
If I use a custom UI, there is no limit in first place. So I would need to take care, that I am not able to enter values, that are not in range using the custom UI? For the automation, the Host knows the range of the parameters by querying GetParameterInfo(). If I limit the parameters within the UI, and the Host limits the parameters according to the defined range, I shouldn't need to check the range of my parameters within the Audio Unit anymore. Is this correct or is there a better way?
Now, if I have to limit the range of one parameter according to the value of another parameter, the Programming Guide tells something like this:
"In some unusual cases you may need to add support for parameter automation to the audio unit itself. For example, you may create a bandpass filter with adjustable upper and lower corner frequencies. Your audio unit then needs to ensure that the upper frequency is never set below the lower frequency. When an audio unit invokes a parameter change in a case like this, it needs to issue a parameter change notification."
Does this mean, I need to create a listener in the AU for every parameter that I need to check against another? Every time the constraint is violated I would report the correct value back using a AudioUnitSetParameter() call? When dealing with automation I would need to have a listener in the UI for every parameter that might be automated as well, so that changes to the parameters will be visible in the UI. However, cases like manually drawn automation data wouldn't be prevented to be drawn in void ranges. Is this all how it is meant to work or did I get something completely wrong. Dealing with a custom UI seems pretty complicated in the beginning.
Thanks so far.
Regards,
Stefan _______________________________________________
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