pub enum Gradient {
Linear,
Power(f32),
Exponential,
}Expand description
The gradient used when mapping the normalized value in the range [0.0, 1.0] to the
desired value.
For example, it is useful for parameters dealing with decibels to have a mapping
gradient around Power(0.15). This is so one tick near the top of the slider/knob
controlling this parameter causes a small change in dB around 0.0 dB and one tick
on the other end causes a large change in dB around -90.0 dB.
Variants§
Linear
Linear mapping
Power(f32)
Power mapping
For example, it is useful for parameters dealing with decibels to have a mapping
gradient around Power(0.15). This is so one tick near the top of the slider/knob
controlling this parameter causes a small change in dB around 0.0 dB and one tick
on the other end causes a large change in dB around -90.0 dB.
Exponential
Exponential (logarithmic) mapping
This is useful for parameters dealing with frequency in Hz.