11#ifndef __AUDACITY_NUMBER_SCALE__
12#define __AUDACITY_NUMBER_SCALE__
100 return !(*
this == other);
105 return 1127 * log(1 + hz / 700);
110 return 700 * (exp(mel / 1127) - 1);
116 const float z1 = 26.81 * hz / (1960 + hz) - 0.53;
118 return z1 + 0.15 * (2.0 - z1);
120 return z1 + 0.22 * (z1 - 20.1);
128 z1 = 2.0 + (z1 - 2.0) / 0.85;
130 z1 = 20.1 + (z1 - 20.1) / 1.22;
131 return 1960 * (z1 + 0.53) / (26.28 - z1);
136 return 11.17268 * log(1 + (46.06538 * hz) / (hz + 14678.49));
141 return 676170.4 / (47.06538 - exp(0.08950404 * erb)) - 14678.49;
146 return -1.0 / std::max (1.0f, hz);
250 nPositions == 1 ? 1 : exp((
mValue1 -
mValue0) / (nPositions - 1)),
Iterator(NumberScaleType type, float step, float value)
const NumberScaleType mType
static float hzToPeriod(float hz)
float PositionToValue(float pp) const
static float erbToHz(float erb)
static float hzToErb(float hz)
bool operator==(const NumberScale &other) const
static float hzToBark(float hz)
Iterator begin(float nPositions) const
NumberScale Reversal() const
float ValueToPosition(float val) const
static float periodToHz(float u)
NumberScale(NumberScaleType type, float value0, float value1)
static float barkToHz(float z1)
bool operator!=(const NumberScale &other) const
static float hzToMel(float hz)
static float melToHz(float mel)
void swap(std::unique_ptr< Alg_seq > &a, std::unique_ptr< Alg_seq > &b)