class Core::AudioFrequencyInterpolator
Overview
Logarithmic (octave-linear) conversion: value = min * (max/min)^normalized. More…
#include <coreaudiointerpolator.h> class AudioFrequencyInterpolator: public Core::Interpolator { public: // fields static constexpr float kDefaultMin = 20.f; static constexpr float kDefaultMax = 20000.f; // construction AudioFrequencyInterpolator( float minRange = kDefaultMin, float maxRange = kDefaultMax ); // methods virtual void setRange(float minRange, float maxRange, float midRange = -1.f); virtual float normalizedToRange(float normalized) const; virtual float rangeToNormalized(float value) const; };
Inherited Members
public: // methods CStringPtr getName() const; void setName(CStringPtr _name); float getMinRange() const; float getMaxRange() const; float getMidRange() const; virtual void setRange(float minRange, float maxRange, float midRange = 1.f); virtual float normalizedToRange(float normalized) const; virtual float rangeToNormalized(float value) const;
Detailed Documentation
Logarithmic (octave-linear) conversion: value = min * (max/min)^normalized.
Requires 0 < minRange < maxRange; midRange is ignored.
Reference: https://www.musicdsp.org/en/latest/Other/87-exponential-parameter-mapping.html
Methods
virtual void setRange(float minRange, float maxRange, float midRange = -1.f)
Set value range [min..max].
(middle value optional)
virtual float normalizedToRange(float normalized) const
Convert from normalized domain [0..1] to value range [min..max].
virtual float rangeToNormalized(float value) const
Convert from value range [min..max] to normalized domain [0..1].