#include <NumberScale.h>
Definition at line 31 of file NumberScale.h.
◆ NumberScale() [1/2]
NumberScale::NumberScale |
( |
| ) |
|
|
inline |
◆ NumberScale() [2/2]
NumberScale::NumberScale |
( |
NumberScaleType |
type, |
|
|
float |
value0, |
|
|
float |
value1 |
|
) |
| |
|
inline |
Definition at line 38 of file NumberScale.h.
40 {
44 {
47 }
48 break;
50 {
53 }
54 break;
56 {
59 }
60 break;
62 {
65 }
66 break;
68 {
71 }
72 break;
74 {
77 }
78 break;
79 default:
80 wxASSERT(false);
81 }
82 }
static float hzToPeriod(float hz)
static float hzToErb(float hz)
static float hzToBark(float hz)
static float hzToMel(float hz)
References hzToBark(), hzToErb(), hzToMel(), hzToPeriod(), mType, mValue0, mValue1, nstBark, nstErb, nstLinear, nstLogarithmic, nstMel, nstNone, and nstPeriod.
◆ barkToHz()
static float NumberScale::barkToHz |
( |
float |
z1 | ) |
|
|
inlinestatic |
◆ begin()
Iterator NumberScale::begin |
( |
float |
nPositions | ) |
const |
|
inline |
Definition at line 232 of file NumberScale.h.
233 {
235 default:
236 wxASSERT(false);
243 return Iterator
248 return Iterator
250 nPositions == 1 ? 1 : exp((
mValue1 -
mValue0) / (nPositions - 1)),
252 }
253 }
References mType, mValue0, mValue1, nstBark, nstErb, nstLinear, nstLogarithmic, nstMel, nstNone, and nstPeriod.
Referenced by anonymous_namespace{SpectrumView.cpp}::DrawClipSpectrum().
◆ erbToHz()
static float NumberScale::erbToHz |
( |
float |
erb | ) |
|
|
inlinestatic |
◆ hzToBark()
static float NumberScale::hzToBark |
( |
float |
hz | ) |
|
|
inlinestatic |
Definition at line 113 of file NumberScale.h.
114 {
115
116 const float z1 = 26.81 * hz / (1960 + hz) - 0.53;
117 if (z1 < 2.0)
118 return z1 + 0.15 * (2.0 - z1);
119 else if (z1 > 20.1)
120 return z1 + 0.22 * (z1 - 20.1);
121 else
122 return z1;
123 }
Referenced by NumberScale(), and ValueToPosition().
◆ hzToErb()
static float NumberScale::hzToErb |
( |
float |
hz | ) |
|
|
inlinestatic |
◆ hzToMel()
static float NumberScale::hzToMel |
( |
float |
hz | ) |
|
|
inlinestatic |
◆ hzToPeriod()
static float NumberScale::hzToPeriod |
( |
float |
hz | ) |
|
|
inlinestatic |
◆ melToHz()
static float NumberScale::melToHz |
( |
float |
mel | ) |
|
|
inlinestatic |
◆ operator!=()
bool NumberScale::operator!= |
( |
const NumberScale & |
other | ) |
const |
|
inline |
Definition at line 98 of file NumberScale.h.
99 {
100 return !(*this == other);
101 }
◆ operator==()
bool NumberScale::operator== |
( |
const NumberScale & |
other | ) |
const |
|
inline |
◆ periodToHz()
static float NumberScale::periodToHz |
( |
float |
u | ) |
|
|
inlinestatic |
◆ PositionToValue()
float NumberScale::PositionToValue |
( |
float |
pp | ) |
const |
|
inline |
Definition at line 155 of file NumberScale.h.
156 {
158 default:
159 wxASSERT(false);
173 }
174 }
static float erbToHz(float erb)
static float periodToHz(float u)
static float barkToHz(float z1)
static float melToHz(float mel)
References barkToHz(), erbToHz(), melToHz(), mType, mValue0, mValue1, nstBark, nstErb, nstLinear, nstLogarithmic, nstMel, nstNone, nstPeriod, and periodToHz().
Referenced by SpectrumVRulerControls::DoHandleWheelRotation(), SpectrumVZoomHandle::DoZoom(), anonymous_namespace{SpectrumView.cpp}::DrawClipSpectrum(), anonymous_namespace{BrushHandle.cpp}::PositionToFrequency(), and anonymous_namespace{SelectHandle.cpp}::PositionToFrequency().
◆ Reversal()
◆ ValueToPosition()
float NumberScale::ValueToPosition |
( |
float |
val | ) |
const |
|
inline |
Definition at line 256 of file NumberScale.h.
257 {
259 default:
260 wxASSERT(false);
274 }
275 }
References hzToBark(), hzToErb(), hzToMel(), hzToPeriod(), mType, mValue0, mValue1, nstBark, nstErb, nstLinear, nstLogarithmic, nstMel, nstNone, and nstPeriod.
Referenced by SpectrumVRulerControls::DoHandleWheelRotation(), anonymous_namespace{BrushHandle.cpp}::FrequencyToPosition(), and anonymous_namespace{SelectHandle.cpp}::FrequencyToPosition().
◆ mType
◆ mValue0
float NumberScale::mValue0 |
|
private |
◆ mValue1
float NumberScale::mValue1 |
|
private |
The documentation for this class was generated from the following file: