The Open Master Hearing Aid (openMHA)  openMHA
Open community platform for hearing aid algorithm research
MHAOvlFilter::FreqScaleFun Namespace Reference

Transform functions from linear scale in Hz to new frequency scales. More...

Functions

mha_real_t hz2hz (mha_real_t x)
 Dummy scale transformation Hz to Hz. More...
 
mha_real_t hz2khz (mha_real_t x)
 
mha_real_t hz2octave (mha_real_t x)
 
mha_real_t hz2third_octave (mha_real_t x)
 
mha_real_t hz2bark (mha_real_t x)
 Transformation to bark scale. More...
 
mha_real_t hz2bark_analytic (mha_real_t)
 
mha_real_t hz2erb (mha_real_t)
 
mha_real_t hz2erb_glasberg1990 (mha_real_t)
 
mha_real_t hz2log (mha_real_t x)
 Third octave frequency scale. More...
 
mha_real_t inv_scale (mha_real_t, mha_real_t(*)(mha_real_t))
 

Detailed Description

Transform functions from linear scale in Hz to new frequency scales.

Function Documentation

◆ hz2hz()

mha_real_t MHAOvlFilter::FreqScaleFun::hz2hz ( mha_real_t  x)

Dummy scale transformation Hz to Hz.

This function implements a dummy scale transformation (linear frequency scale).

Parameters
xInput frequency in Hz
Returns
Frequency in Hz

◆ hz2khz()

mha_real_t MHAOvlFilter::FreqScaleFun::hz2khz ( mha_real_t  x)

◆ hz2octave()

mha_real_t MHAOvlFilter::FreqScaleFun::hz2octave ( mha_real_t  x)

◆ hz2third_octave()

mha_real_t MHAOvlFilter::FreqScaleFun::hz2third_octave ( mha_real_t  x)

◆ hz2bark()

mha_real_t MHAOvlFilter::FreqScaleFun::hz2bark ( mha_real_t  x)

Transformation to bark scale.

This function implements a critical band rate (bark) scale.

Parameters
xInput frequency in Hz
Returns
Critical band rate in Bark

◆ hz2bark_analytic()

mha_real_t MHAOvlFilter::FreqScaleFun::hz2bark_analytic ( mha_real_t  x)

◆ hz2erb()

mha_real_t MHAOvlFilter::FreqScaleFun::hz2erb ( mha_real_t  x)

◆ hz2erb_glasberg1990()

mha_real_t MHAOvlFilter::FreqScaleFun::hz2erb_glasberg1990 ( mha_real_t  x)

◆ hz2log()

mha_real_t MHAOvlFilter::FreqScaleFun::hz2log ( mha_real_t  x)

Third octave frequency scale.

This function implements a third octave scale. Frequencies below 16 Hz are mapped to 16 Hz.

Parameters
xFrequency in Hz
Returns
Third octaves relative to 1000 Hz

◆ inv_scale()

mha_real_t MHAOvlFilter::FreqScaleFun::inv_scale ( mha_real_t  y,
mha_real_t(*)(mha_real_t fun 
)