Re: Custom Parameter scaling and default view...
Re: Custom Parameter scaling and default view...
- Subject: Re: Custom Parameter scaling and default view...
- From: Robert Grant <email@hidden>
- Date: Tue, 15 Oct 2002 16:51:26 -0400
Chris,
Can you explain how those utility functions work? I don't understand
how it
knows what the min/max of the value being passed in might be. I would
love
to be able to use them with my knobs.
Thanks,
Robert.
On Tuesday, October 15, 2002, at 01:47 PM, Chris Rogers wrote:
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.
_______________________________________________
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.