The Open Master Hearing Aid (openMHA)  openMHA
Open community platform for hearing aid algorithm research
ADM::ADM< F > Class Template Reference

Adaptive differential microphone, working for speech frequency range. More...

Public Member Functions

 ADM (F fs, F dist, unsigned lp_order, const F *lp_alphas, unsigned decomb_order, const F *decomb_alphas, F tau_beta=F(50e-3), F mu_beta=F(1e-4))
 Create Adaptive Differential Microphone. More...
 
process (const F &front, const F &back, const F &external_beta=F(-1), bool update_beta=true)
 ADM processes one frame. More...
 
beta () const
 

Private Attributes

Delay< F > m_delay_front
 
Delay< F > m_delay_back
 
Linearphase_FIR< F > m_lp_bf
 
Linearphase_FIR< F > m_lp_result
 
Linearphase_FIR< F > m_decomb
 
m_beta
 
m_mu_beta
 
m_powerfilter_coeff
 
m_powerfilter_norm
 
m_powerfilter_state
 

Detailed Description

template<class F>
class ADM::ADM< F >

Adaptive differential microphone, working for speech frequency range.

Constructor & Destructor Documentation

◆ ADM()

template<class F >
ADM::ADM< F >::ADM ( fs,
dist,
unsigned  lp_order,
const F *  lp_alphas,
unsigned  decomb_order,
const F *  decomb_alphas,
tau_beta = F(50e-3),
mu_beta = F(1e-4) 
)

Create Adaptive Differential Microphone.

Parameters
fsSampling rate / Hz
distDistance between physical microphones / m
lp_orderFilter order of FIR lowpass filter used for adaptation
lp_alphasPointer to array of alpha coefficients for the lowpass filter used for adaptation. Since this class uses linear phase FIR filters only, only the first half (order/2 + 1) of the coefficients will be read (coefficients for linear-phase FIR filters are symmetric).
decomb_orderFilter order of FIR compensation filter (compensates for comb filter characteristic). decomb_order <= 1 deactivates filter.
decomb_alphasPointer to array of alpha coefficients for the compensation filter used to compensate for the comb filter characteristic. Since this class uses linear phase FIR filters only, only the first half (order/2 + 1)of the coefficients will be read (coefficients for linear-phase FIR filters are symmetric).
tau_betaTime constant of the lowpass filter used for averaging the power of the output signal
mu_betaadaptation speed

Member Function Documentation

◆ process()

template<class F >
F ADM::ADM< F >::process ( const F &  front,
const F &  back,
const F &  external_beta = F(-1),
bool  update_beta = true 
)
inline

ADM processes one frame.

Parameters
frontThe current front input signal sample
backThe current rear input signal sample
external_betaIf >= 0, this is used as the "beta" parameter for direction to filter out. Else, the beta parameter is adapted to filtered out a direction so that best reduction of signal intensity from the back hemisphere is achieved.
update_betaPerform the beta adaptation step?
Returns
The computed output sample

◆ beta()

template<class F >
F ADM::ADM< F >::beta ( ) const
inline

Member Data Documentation

◆ m_delay_front

template<class F >
Delay<F> ADM::ADM< F >::m_delay_front
private

◆ m_delay_back

template<class F >
Delay<F> ADM::ADM< F >::m_delay_back
private

◆ m_lp_bf

template<class F >
Linearphase_FIR<F> ADM::ADM< F >::m_lp_bf
private

◆ m_lp_result

template<class F >
Linearphase_FIR<F> ADM::ADM< F >::m_lp_result
private

◆ m_decomb

template<class F >
Linearphase_FIR<F> ADM::ADM< F >::m_decomb
private

◆ m_beta

template<class F >
F ADM::ADM< F >::m_beta
private

◆ m_mu_beta

template<class F >
F ADM::ADM< F >::m_mu_beta
private

◆ m_powerfilter_coeff

template<class F >
F ADM::ADM< F >::m_powerfilter_coeff
private

◆ m_powerfilter_norm

template<class F >
F ADM::ADM< F >::m_powerfilter_norm
private

◆ m_powerfilter_state

template<class F >
F ADM::ADM< F >::m_powerfilter_state
private

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