Re: GetParameterValueStrings
Re: GetParameterValueStrings
- Subject: Re: GetParameterValueStrings
- From: Jim Wintermyre <email@hidden>
- Date: Fri, 15 Aug 2003 15:02:18 -0700
> Also, I have a question about GetParameterValueStrings. This call would
appear to be there for the purpose of providing human-readable values for
generic float parameters, but I can't find any documentation on it.
/Developer/Documentation/CoreAudio/AudioUnits/Topics/au_properties.html#kAudioUnitProperty_ParameterValueStrings
But as you'll see, it's not for float, or at least float in the sense of
continuous, parameters. It's for parameters that have descrete choices,
with unit type kAudioUnitParameterUnit_Indexed. What you are looking for
is not here yet but will come with the next update, as Bill mentioned a
couple days ago, with a new kAudioUnitProperty_ParameterValueName
property.
How is it used, and do I have to set any special flags on the parameters
for my reported values ("-6dB") to be made visible in the host (instead
of "0.500")
Of course, you could also make the parameter's unit type be
kAudioUnitParameterUnit_Decibels and provide the parameter's value range
in the actual dB range (or something close enough, since probably won't
want to make the minimum literally -infinity). But maybe that doesn't
work well for your particular case, I don't know...
First, a general comment. I'm coming from a VST background. I would
imagine that several AU developers are as well, so I would think it
would make sense to have AU be *at least* as complete as VST. This
is one of those areas where I don't think it is, or where I'm not
understanding the AU spec fully to see how it completely covers this.
In VST, every parameter is a continuous float from 0 to 1. For
example, let's say we have a parameter that controls the scale used
by our output VU meter. It has 3 values, corresponding to -10dB
scale, 0dB scale, and +4dB scale. The easiest way to actually
represent the value in a float is to just divide the range of the
float by the number of values and use that as your step increment, so
you end up with values of 0.0, 0.5, 1.0. However, if you don't have
a custom UI so you're using the default UI (or controls mode in
Logic), seeing these values displayed doesn't make a whole lot of
sense. However, VST has extra functions which give the host extra
information on how to treat/display that parameter.
getParameterName() - Gets the name of the parameter for display.
"Meter Display" in this case.
getParameterDisplay() - Gets the textual value of the paramter for
display. "-10dB", "0dB", or "+4dB" in this case.
getParameterLabel() - Gets label for units of parameter for display.
Nothing in this case, but could be "dB", "Hz", "Thingies", whatever.
getParameterProperties() - Catch-all routine that sets various
properties of parameters, including whether or not they boolean,
indexed, or continuous; the max value for indexed params; a separate
"display index" for example for ordering the params in a specific
order on a HW control surface; the parameter category ("bag" or
whatever it was decided on this list a while back); short labels for
HW control surface display, etc. In this case, we'd set the
parameter to be indexed with 3 values, and maybe give it a short name
and category.
With these functions, a host can display a generic UI for this
parameter which has all required info for the user, and an external
control surface has everything it needs too.
What seems to be missing in AU is the equivalent of
getParameterDisplay(), which I guess is what
kAudioUnitProperty_ParameterValueName is going to be for?
Also missing is the equivalent of getParameterLabel(). I see that
there are many types of param units in AudioUnitParameterUnit... but
the thing is, with the above mechanism, it doesn't matter what the
unit is. How the plugin treats the param is entirely up to it, and
through those 4 functions it gives the host all the information it
needs to deal with the parameter.
If I'm missing something, please enlighten me! :-) As it stands now,
our VST plugins when used in default editor mode or controls mode in
Logic on OS 9 are a lot more useable than the AU versions on OS X.
Thanks,
Jim
_______________________________________________
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.