The Open Master Hearing Aid (openMHA)  openMHA
Open community platform for hearing aid algorithm research
MHAFilter::gamma_flt_t Class Reference

Class for gammatone filter. More...

Public Member Functions

 gamma_flt_t (std::vector< mha_real_t > cf, std::vector< mha_real_t > bw, mha_real_t srate, unsigned int order)
 Constructor. More...
 
 ~gamma_flt_t ()
 
void operator() (mha_wave_t &X, mha_spec_t &Y)
 Filter method. More...
 
void operator() (mha_wave_t &X, mha_wave_t &Yre, mha_wave_t &Yim)
 Filter method. More...
 
void operator() (mha_wave_t &Yre, mha_wave_t &Yim, unsigned int stage)
 Filter method for specific stage. More...
 
void phase_correction (unsigned int desired_delay, unsigned int inchannels)
 
void set_weights (std::vector< mha_complex_t > new_B)
 
void set_weights (unsigned int stage, std::vector< mha_complex_t > new_B)
 
std::vector< mha_complex_tget_weights () const
 
std::vector< mha_complex_tget_weights (unsigned int stage) const
 
std::vector< mha_real_tget_resynthesis_gain () const
 
void reset_state ()
 
const std::vector< mha_complex_t > & get_A ()
 
std::string inspect () const
 

Private Attributes

std::vector< mha_complex_tA
 
std::vector< complex_bandpass_tGF
 
MHASignal::delay_tdelay
 
std::vector< int > envelope_delay
 
std::vector< mha_real_tresynthesis_gain
 
std::vector< mha_real_tcf_
 
std::vector< mha_real_tbw_
 
mha_real_t srate_
 

Detailed Description

Class for gammatone filter.

Constructor & Destructor Documentation

◆ gamma_flt_t()

MHAFilter::gamma_flt_t::gamma_flt_t ( std::vector< mha_real_t cf,
std::vector< mha_real_t bw,
mha_real_t  srate,
unsigned int  order 
)

Constructor.

Parameters
cfCenter frequency in Hz.
bwBandwidth in Hz (same number of entries as in cf).
srateSampling frequency in Hz.
orderFilter order.

◆ ~gamma_flt_t()

MHAFilter::gamma_flt_t::~gamma_flt_t ( )

Member Function Documentation

◆ operator()() [1/3]

void MHAFilter::gamma_flt_t::operator() ( mha_wave_t X,
mha_spec_t Y 
)
inline

Filter method.

◆ operator()() [2/3]

void MHAFilter::gamma_flt_t::operator() ( mha_wave_t X,
mha_wave_t Yre,
mha_wave_t Yim 
)
inline

Filter method.

◆ operator()() [3/3]

void MHAFilter::gamma_flt_t::operator() ( mha_wave_t Yre,
mha_wave_t Yim,
unsigned int  stage 
)
inline

Filter method for specific stage.

◆ phase_correction()

void MHAFilter::gamma_flt_t::phase_correction ( unsigned int  desired_delay,
unsigned int  inchannels 
)

◆ set_weights() [1/2]

void MHAFilter::gamma_flt_t::set_weights ( std::vector< mha_complex_t new_B)

◆ set_weights() [2/2]

void MHAFilter::gamma_flt_t::set_weights ( unsigned int  stage,
std::vector< mha_complex_t new_B 
)

◆ get_weights() [1/2]

std::vector<mha_complex_t> MHAFilter::gamma_flt_t::get_weights ( ) const
inline

◆ get_weights() [2/2]

std::vector<mha_complex_t> MHAFilter::gamma_flt_t::get_weights ( unsigned int  stage) const
inline

◆ get_resynthesis_gain()

std::vector<mha_real_t> MHAFilter::gamma_flt_t::get_resynthesis_gain ( ) const
inline

◆ reset_state()

void MHAFilter::gamma_flt_t::reset_state ( )

◆ get_A()

const std::vector<mha_complex_t>& MHAFilter::gamma_flt_t::get_A ( )
inline

◆ inspect()

std::string MHAFilter::gamma_flt_t::inspect ( ) const
inline

Member Data Documentation

◆ A

std::vector<mha_complex_t> MHAFilter::gamma_flt_t::A
private

◆ GF

std::vector<complex_bandpass_t> MHAFilter::gamma_flt_t::GF
private

◆ delay

MHASignal::delay_t* MHAFilter::gamma_flt_t::delay
private

◆ envelope_delay

std::vector<int> MHAFilter::gamma_flt_t::envelope_delay
private

◆ resynthesis_gain

std::vector<mha_real_t> MHAFilter::gamma_flt_t::resynthesis_gain
private

◆ cf_

std::vector<mha_real_t> MHAFilter::gamma_flt_t::cf_
private

◆ bw_

std::vector<mha_real_t> MHAFilter::gamma_flt_t::bw_
private

◆ srate_

mha_real_t MHAFilter::gamma_flt_t::srate_
private

The documentation for this class was generated from the following files: