The Open Master Hearing Aid (openMHA)
openMHA
Open community platform for hearing aid algorithm research
|
Runtime configuration class of gtfb_simple_bridge plugin. More...
Public Member Functions | |
gtfb_simple_rt_t (MHA_AC::algo_comm_t &ac, const std::string &name, mhaconfig_t &chcfg, std::vector< mha_real_t > cf, std::vector< mha_real_t > bw, unsigned int order, unsigned int pre_stages, unsigned int desired_delay, std::vector< mha_real_t > &vcltass, std::vector< mha_real_t > &resynthesis_gain, const std::string &element_gain_name) | |
mha_wave_t * | pre_plugin (mha_wave_t *s) |
Filter real input signal s with the pre_stages filter orders in each gammatone filter band. More... | |
mha_wave_t * | post_plugin (mha_wave_t *s) |
Post-filter the complex-valued filter-bank signal s after it has been processed by the loaded plugin. More... | |
void | insert_ac_variables () |
(Re-)insert all AC variables into the AC space. More... | |
const MHAFilter::gamma_flt_t & | get_gf () const |
Const-accessor to contained gammatone filterbank object. More... | |
Static Private Member Functions | |
static std::vector< mha_real_t > | duplicate_vector (const std::vector< mha_real_t > &src, unsigned int nchannels) |
Helper function to repeat the elements in a vector. More... | |
Private Attributes | |
unsigned int | _order |
Total number of gammatone filter orders. More... | |
unsigned int | _pre_stages |
Number of filter orders applied before the loaded plugin is invoked. More... | |
unsigned int | nbands |
Number of frequency bands to produce = number of gammatone filters. More... | |
MHA_AC::waveform_t | imag |
Storage for the imaginary part of the filterbank signal. More... | |
MHA_AC::waveform_t | accf |
AC variable to publish the center frequencies of the gammatone filters. More... | |
MHA_AC::waveform_t | acbw |
AC variable to publish the bandwiths of the gammatone filters. More... | |
MHASignal::waveform_t | input |
Real part of the filterbank signal. More... | |
MHASignal::waveform_t | output |
Resynthesized broadband signal, used as the output signal of this plugin. More... | |
MHAFilter::gamma_flt_t | gf |
The gammatone filter bank implementation. More... | |
MHA_AC::waveform_t | cLTASS |
AC variable to publish band-specific LTASS level correction values. More... | |
MHA_AC::waveform_t | ac_resynthesis_gain |
AC variable to publish the configured per-frequency resyntesis gains. More... | |
std::string | element_gain_name_ |
Either an empty string, or the name of an AC variable from which element-wise linear factors are read. More... | |
MHA_AC::algo_comm_t & | _ac |
Algorithm Communication Variable space. More... | |
Runtime configuration class of gtfb_simple_bridge plugin.
gtfb_simple_rt_t::gtfb_simple_rt_t | ( | MHA_AC::algo_comm_t & | ac, |
const std::string & | name, | ||
mhaconfig_t & | chcfg, | ||
std::vector< mha_real_t > | cf, | ||
std::vector< mha_real_t > | bw, | ||
unsigned int | order, | ||
unsigned int | pre_stages, | ||
unsigned int | desired_delay, | ||
std::vector< mha_real_t > & | vcltass, | ||
std::vector< mha_real_t > & | resynthesis_gain, | ||
const std::string & | element_gain_name | ||
) |
mha_wave_t * gtfb_simple_rt_t::pre_plugin | ( | mha_wave_t * | s | ) |
Filter real input signal s with the pre_stages filter orders in each gammatone filter band.
The real part of the complex output is returned in the return value of the method, the imaginary part is stored into the AC variable.
s | real-valued, broad-band input signal |
mha_wave_t * gtfb_simple_rt_t::post_plugin | ( | mha_wave_t * | s | ) |
Post-filter the complex-valued filter-bank signal s after it has been processed by the loaded plugin.
The remaining gammatone filter orders are applied to restrict the loaded plugin's output signal to the respective bands. After
s | complex-valued, filter-bank signal. This signal is produced by letting the loaded plugin process the output signal of the pre_plugin method. |
void gtfb_simple_rt_t::insert_ac_variables | ( | ) |
(Re-)insert all AC variables into the AC space.
Must be called during each prepare() and process() callback of the plugin. For the process() callback, this method is called from pre_plugin(). For the prepare() callback, it must be called by the plugin interface.
|
inline |
Const-accessor to contained gammatone filterbank object.
|
staticprivate |
Helper function to repeat the elements in a vector.
src | vector to repeat |
nchannels | number of times to repeat input vector |
|
private |
Total number of gammatone filter orders.
|
private |
Number of filter orders applied before the loaded plugin is invoked.
|
private |
Number of frequency bands to produce = number of gammatone filters.
|
private |
Storage for the imaginary part of the filterbank signal.
It is used as the imaginary input signal for the loaded plugin. Furthermore, it is expected that the loaded plugin processes the imaginary part of the data in place.
|
private |
AC variable to publish the center frequencies of the gammatone filters.
|
private |
AC variable to publish the bandwiths of the gammatone filters.
|
private |
Real part of the filterbank signal.
It is used as the real input signal to the loaded plugin.
|
private |
Resynthesized broadband signal, used as the output signal of this plugin.
|
private |
The gammatone filter bank implementation.
|
private |
AC variable to publish band-specific LTASS level correction values.
|
private |
AC variable to publish the configured per-frequency resyntesis gains.
|
private |
Either an empty string, or the name of an AC variable from which element-wise linear factors are read.
|
private |
Algorithm Communication Variable space.