Functions

Global Decibel Functions

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.

Detailed Description

Convert to and from dB values from amplitude or energy coefficient values.


Function Documentation

template<class Type >
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.

Parameters:
xdBSPL amplitude
refdBSPL reference amplitude (defaults to 1.0)

Definition at line 32 of file Dynamics.h.

References Return.

{ Return( pow(10.0, x / 20.0 ) / ref); }
template<class Type >
Type dBSIL ( Type  x,
Type  ref = 1.0 
) [inline]

Return the dB SIL of two amplitudes.

Note: Type must be floating point type.

Parameters:
xdBSIL amplitude
refdBSIL reference amplitude (defaults to 1.0)

Definition at line 45 of file Dynamics.h.

References Return.

{ Return 10.0 * log10(x / ref); }
template<class Type >
Type dBSPL ( Type  x,
Type  ref = 1.0 
) [inline]

Return the dB SPL of two amplitudes.

Note: Type must be floating point type.

Parameters:
xdBSPL amplitude
refdBSPL reference amplitude (defaults to 1.0)

Definition at line 39 of file Dynamics.h.

References Return.

{ Return 20.0 * log10(x / ref); }