The Open Master Hearing Aid (openMHA)
openMHA
Open community platform for hearing aid algorithm research
|
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_t * | states (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_t & | cvalue (unsigned frame, unsigned channel, unsigned band) |
Public Attributes | |
unsigned | order |
The order of the gammatone filters. More... | |
std::vector< mha_complex_t > | coeff |
The complex coefficients of the gammatone filter bands. More... | |
std::vector< mha_complex_t > | norm_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_t > | state |
Storage for Filter state. More... | |
Configuration for Gammatone Filterbank Analyzer.
|
inline |
Create a configuration for Gammatone Filterbank Analyzer.
ch | Number of Audio channels. |
frames | Number of Audio frames per chunk. |
ord | The order of the gammatone filters. |
_coeff | Complex gammatone filter coefficients. |
_norm_phase | Normalization and phase correction factors. |
|
inline |
|
inline |
Each band is split into this number of bands.
|
inline |
The number of separate audio channels.
|
inline |
The number of frames in one chunk.
|
inline |
Returns pointer to filter states for that band.
|
inline |
unsigned gtfb_analyzer::gtfb_analyzer_cfg_t::order |
The order of the gammatone filters.
std::vector<mha_complex_t> gtfb_analyzer::gtfb_analyzer_cfg_t::coeff |
The complex coefficients of the gammatone filter bands.
std::vector<mha_complex_t> gtfb_analyzer::gtfb_analyzer_cfg_t::norm_phase |
Combination of normalization and phase correction factor.
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
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]