kAudioUnitParameterFlag_DisplayLogarithmic in Tiger.
kAudioUnitParameterFlag_DisplayLogarithmic in Tiger.
- Subject: kAudioUnitParameterFlag_DisplayLogarithmic in Tiger.
- From: James McCartney <email@hidden>
- Date: Fri, 4 Mar 2005 16:57:26 -0800
We are making a very small change in Tiger in
kAudioUnitParameterFlag_DisplayLogarithmic.
background:
kAudioUnitParameterFlag_DisplayLogarithmic is usually used to display
a parameter as if the UI slider were logarithmic graph paper. This
linearly scales parameters that are naturally perceived exponentially
such as frequency. so that you could have an LFO frequency slider
that went from 0.01 to 100.0 mapped such that 1/4th of the way is
0.1, 1/2 way is 1.0 and 3/4ths of the way is 10.0. Each 1/4th of the
way the value changes by the 4th root of the ratio of max/min which
in this case happens to be a ratio of 10.0:
0.01...0.1...1.0...10.0...100.0
the change:
Now it is not mathematically possible to make such a curve go from
0.0 to 1.0 because 0 times any value is still zero. However in
Panther we let you think this was possible by forcing the zero to
actually be 0.00001. Thus the center value of a slider from 0.00001
to 1.0 is sqrt(1.0/0.00001) == 0.00316.. This is not very useful and
probably misleads someone who is already confused into thinking that
this is a reasonable thing to do. So we are removing this max(x,
0.00001) from the code. If you had actually used a zero to one range
you would have gotten a slider with strange behavior.
By the same token, it is not possible for a
kAudioUnitParameterFlag_DisplayLogarithmic parameter's min and max
values to span zero, one being negative and another positive. A
negative value cannot be changed to a positive value by raising it to
other than certain integer powers, which makes a continuous slider
impossible.
-- james mccartney
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden