The Open Master Hearing Aid (openMHA)  openMHA
Open community platform for hearing aid algorithm research
gtfb_analyzer::gtfb_analyzer_cfg_t Struct Reference

Configuration for Gammatone Filterbank Analyzer. More...

Public Member Functions

unsigned bands () const
 Each band is split into this number of bands. More...
 
unsigned channels () const
 The number of separate audio channels. More...
 
unsigned frames () const
 The number of frames in one chunk. More...
 
mha_complex_tstates (unsigned channel, unsigned band)
 Returns pointer to filter states for that band. More...
 
 gtfb_analyzer_cfg_t (unsigned ch, unsigned frames, unsigned ord, const std::vector< mha_complex_t > &_coeff, const std::vector< mha_complex_t > &_norm_phase)
 Create a configuration for Gammatone Filterbank Analyzer. More...
 
 ~gtfb_analyzer_cfg_t ()
 
mha_complex_tcvalue (unsigned frame, unsigned channel, unsigned band)
 

Public Attributes

unsigned order
 The order of the gammatone filters. More...
 
std::vector< mha_complex_tcoeff
 The complex coefficients of the gammatone filter bands. More...
 
std::vector< mha_complex_tnorm_phase
 Combination of normalization and phase correction factor. More...
 
mha_wave_t s_out
 Storage for the (complex) output signal. More...
 
std::vector< mha_complex_tstate
 Storage for Filter state. More...
 

Detailed Description

Configuration for Gammatone Filterbank Analyzer.

Constructor & Destructor Documentation

◆ gtfb_analyzer_cfg_t()

gtfb_analyzer::gtfb_analyzer_cfg_t::gtfb_analyzer_cfg_t ( unsigned  ch,
unsigned  frames,
unsigned  ord,
const std::vector< mha_complex_t > &  _coeff,
const std::vector< mha_complex_t > &  _norm_phase 
)
inline

Create a configuration for Gammatone Filterbank Analyzer.

Parameters
chNumber of Audio channels.
framesNumber of Audio frames per chunk.
ordThe order of the gammatone filters.
_coeffComplex gammatone filter coefficients.
_norm_phaseNormalization and phase correction factors.

◆ ~gtfb_analyzer_cfg_t()

gtfb_analyzer::gtfb_analyzer_cfg_t::~gtfb_analyzer_cfg_t ( )
inline

Member Function Documentation

◆ bands()

unsigned gtfb_analyzer::gtfb_analyzer_cfg_t::bands ( ) const
inline

Each band is split into this number of bands.

◆ channels()

unsigned gtfb_analyzer::gtfb_analyzer_cfg_t::channels ( ) const
inline

The number of separate audio channels.

◆ frames()

unsigned gtfb_analyzer::gtfb_analyzer_cfg_t::frames ( ) const
inline

The number of frames in one chunk.

◆ states()

mha_complex_t* gtfb_analyzer::gtfb_analyzer_cfg_t::states ( unsigned  channel,
unsigned  band 
)
inline

Returns pointer to filter states for that band.

◆ cvalue()

mha_complex_t& gtfb_analyzer::gtfb_analyzer_cfg_t::cvalue ( unsigned  frame,
unsigned  channel,
unsigned  band 
)
inline

Member Data Documentation

◆ order

unsigned gtfb_analyzer::gtfb_analyzer_cfg_t::order

The order of the gammatone filters.

◆ coeff

std::vector<mha_complex_t> gtfb_analyzer::gtfb_analyzer_cfg_t::coeff

The complex coefficients of the gammatone filter bands.

◆ norm_phase

std::vector<mha_complex_t> gtfb_analyzer::gtfb_analyzer_cfg_t::norm_phase

Combination of normalization and phase correction factor.

◆ s_out

mha_wave_t gtfb_analyzer::gtfb_analyzer_cfg_t::s_out

Storage for the (complex) output signal.

Each of the real input audio channels is split into frequency bands with complex time signal output. The split complex time signal is again stored in a mha_wave_t buffer. Each complex time signal is stored as adjacent real and imaginary channels. Complex output from one source channel is stored in adjacent complex output channels.

Example: If the input has 2 channels ch0 ch1, and gtfb_analyzer splits into 3 bands b0 b1 b2, then the order of output channels in s_out is: ch0_b0_real ch0_b0_imag ch0_b1_real ch0_b1_imag ch0_b2_real ch0_b2_imag ch1_b0_real ch1_b1_imag ch1_b1_real ch1_b1_imag ch1_b2_real ch1_b2_imag

◆ state

std::vector<mha_complex_t> gtfb_analyzer::gtfb_analyzer_cfg_t::state

Storage for Filter state.

Holds channels() * bands() * order complex filter states. Layout: state[(bands()*channel+band)*order+stage]


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