GenericAUView and parameter pain
GenericAUView and parameter pain
- Subject: GenericAUView and parameter pain
- From: Marc Poirier <email@hidden>
- Date: Wed, 21 Apr 2004 13:19:54 -0400 (EDT)
Alright, I'm having a hell of a time with getting any kind of usable
interface happening with a new AU and the Apple Generic AUView. Perhaps
I'll start with a little explanation of the plugin's interface...
It has 2 parameters. One is for DC blocking frequency, ranging from 0 Hz
to 80 Hz (those of you familiar with the Generic AUView's handling of Hz
parameters may already be guessing where I'm going with this). The other
is for some Nyquist protection frequency or something (sorry, it's not my
plugin, it's a port) that is an offset from the Nyquist. The original
plugin expressed this parameter internally as 0 to 400, but that value is
actually subtracted from the current Nyquist, so really the range is like
Nyquist to Nyquist-400.
The first problem with both of these parameters is the Generic AUView's
*#$%ing usage of a logarithmic scale whenever the parameter unit type is
kAudioUnitParameterUnit_Hertz. The action on this with a parameter that
ranges from 0 to some other really low value is HORRIBLE. I mean it just
sucks so ultra-bad, you hate hate hate to use the plugin. And I am not
not not setting the kAudioUnitParameterFlag_DisplayLogarithmic flag, so I
don't want that damn behavior. If I did, I'd set that flag. It's
absolutely terribly inappropriate for low-value frequency ranges.
The next problems came up with the Nyquist parameter. For that parameter,
I started off just leaving it as 0 to 400, but of course it's a pretty
misleading value on the Generic AUView. So I thought maybe it was a good
case for a ValuesHaveStrings parameter. So I tried that. Unfortunately,
the Generic AUView only uses that property to set the displays of the min
and max range. It does not use it for displaying the actual value, nor
does it use it for interpretting typed in values (and yes, I'm
implementing the kAudioUnitProperty_ParameterValueFromString property,
too). So you actually get an even more messed up and confusing interface,
because the min and max are 21650 and 22050, but the values are going from
0 to 400.
So then I thought, well, maybe it would make more sense to set the value
range to be -400 to 0, so it's more clear that that's what is being
adjusted from the Nyquist. However, thanks to the Generic AUView's
"helpful" auto-logarization, negative values completely don't work for Hz
parameters. Argh, so that's just a complete impossibility. So I reverted
back to 0 to 400.
So anyway, I don't know if anyone has any advice to help me get this
plugin to be something actually usable. I've put it here for curious
folks to see the problems that I'm talking about:
http://destroyfx.org/ktaudiohealer.tar.gz
Be sure to check out how ridiculously hard it is to use the parameters
with logarithmic value scaling.
Marc
_______________________________________________
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.