Re: Custom Parameter scaling and default view...
Re: Custom Parameter scaling and default view...
- Subject: Re: Custom Parameter scaling and default view...
- From: Chris Rogers <email@hidden>
- Date: Tue, 15 Oct 2002 10:47:56 -0700
Franck,
Please notice that the generic view will notice that a parameter's units
are Hertz and then do the reasonable exponential curve scaling for the
slider control. We provide functions AUParameterValueFromLinear()
and AUParameterValueToLinear() in AudioUnitUtilities.h to convert back
and forth in a general way between log <-> linear.
We also have the units type kAudioUnitParameterUnit_AbsoluteCents
which publishes a parameter explicitly with a log frequency scale.
kAudioUnitParameterUnit_AbsoluteCents has the interesting property of
corresponding to the pitch of 100 times a MIDI note number!
Chris Rogers
Core Audio
Apple Computer
>
Hello (again),
>
>
In my audio unit I have a filter frequency setting, and basically I
>
scaled it to fit an exponential curve so that I have access to the
>
most useful frequencies (in that particular case almost 70% of the
>
slider gives me access to the 300-1000Hz range and the last 30% to
>
1000-4000Hz). To make things simple I declared it's type as
>
kAudioUnitParameterUnit_Generic...that's ok for me since the plugin
>
will sport a custom UI so the user will not care about this being a
>
generic parameter...
>
But this lead me to ask myself how one would achieve that kind of
>
scaling using the default view provided by logic for instance...I
>
mean, if we had decided to use a generic view, I would probably have
>
declared my parameter as kAudioUnitParameterUnit_Hertz to get the
>
units of my parameter displayed correctly, but then the slider would
>
return me the frequency in a linear way...I don't know if you get my
>
point, but basically I have no clue how the default sliders could
>
return values in a non-linear scaled . You can do that with vst
>
plugins (I recall it's called GetParameterDisplay or something...).
>
I'm sure it can be achieved in audio units too...has it something to
>
deal with the methods in the AUVParameter class? It's really not a
>
big deal for me right now, but I'd like to understand that.
>
>
Greetings,
>
>
Franck
_______________________________________________
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.