Convert to and from dB values from amplitude or energy coefficient values. More...
Functions | |
template<class Type > | |
Type | dBCoefficient (Type x, Type ref=1.0) |
Return coefficient corresponding to a ratio of Real dB values. | |
template<class Type > | |
Type | dBSPL (Type x, Type ref=1.0) |
Return the dB SPL of two amplitudes. | |
template<class Type > | |
Type | dBSIL (Type x, Type ref=1.0) |
Return the dB SIL of two amplitudes. |
Convert to and from dB values from amplitude or energy coefficient values.
Type dBCoefficient | ( | Type | x, |
Type | ref = 1.0 |
||
) | [inline] |
Return coefficient corresponding to a ratio of Real dB values.
Note: Type must be floating point type.
x | dBSPL amplitude |
ref | dBSPL reference amplitude (defaults to 1.0) |
Definition at line 32 of file Dynamics.h.
References Return.
{ Return( pow(10.0, x / 20.0 ) / ref); }
Type dBSIL | ( | Type | x, |
Type | ref = 1.0 |
||
) | [inline] |
Return the dB SIL of two amplitudes.
Note: Type must be floating point type.
x | dBSIL amplitude |
ref | dBSIL reference amplitude (defaults to 1.0) |
Definition at line 45 of file Dynamics.h.
References Return.
{ Return 10.0 * log10(x / ref); }
Type dBSPL | ( | Type | x, |
Type | ref = 1.0 |
||
) | [inline] |
Return the dB SPL of two amplitudes.
Note: Type must be floating point type.
x | dBSPL amplitude |
ref | dBSPL reference amplitude (defaults to 1.0) |
Definition at line 39 of file Dynamics.h.
References Return.
{ Return 20.0 * log10(x / ref); }