Is there a way for an Audio Unit host to step through a plugin’s parameters and gain such information as:
- parameter name as a string e.g. “Delay Time”
- parameter range (minimum, maximum)
- parameter units (e.g. seconds)
- parameter control (e.g. slider)
AFAICT this information is available in the plugin, but I can’t figure out how to query it from the host side.
You’ll first need to
#importCAAUParameter and AUParamInfo (which can be found in /Developer/Extras/CoreAudio/PublicUtility).EDIT: These files are now found in the “Audio Tools For Xcode” package. You can get it by going to Xcode > Open Developer Tool > More Developer Tools…
Assuming you have an AudioUnit called
theUnitThe following code will set you up to iterate throughtheUnit‘s parameters:For example,
info.GetParamInfo(i))->ParamInfo()will give you an AudioUnitParameterInfo struct which is defined as follows:Note that you’ll need to open the AudioUnit first (eg. by calling AUGraphOpen() on the Graph which contains the unit).