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

Runtime configuration class for generating an electrodogram from an audio signal, using a stimulation strategy similar to a typical ACE (advanced combination encoder, n-of-m) coding strategy with 22 channels. More...

Public Member Functions

 Ci_simulation_ace_cfg (unsigned int n_electrodes, mha_real_t compression_coefficient, mha_real_t base_level, mha_real_t saturation_level, std::vector< mha_real_t > threshold_level, std::vector< mha_real_t > comfort_level, std::vector< int > disabled_electrodes, unsigned int stimulation_order, std::default_random_engine random_number_generator)
 Constructor of the runtime configuration class. More...
 
mha_spec_tprocess (mha_spec_t *signal, MHA_AC::waveform_t *electrodogram_ac)
 Process function of the runtime configuration class (main signal processing function). More...
 

Private Attributes

unsigned int n_electrodes_cfg
 Number of active electrodes (cannot be changed at runtime) More...
 
mha_real_t compression_coefficient_cfg
 Compression coefficient of the loudness growth function. More...
 
mha_real_t base_level_cfg
 Base level of the input (acoustic) dynamic range / Pa. More...
 
mha_real_t saturation_level_cfg
 Saturation level of the input (acoustic) dynamic range / Pa. More...
 
std::vector< mha_real_tthreshold_level_cfg
 Vector containing the threshold level of the output (electric) dynamic range for each electrode / CU. More...
 
std::vector< mha_real_tcomfort_level_cfg
 Vector containing the comfort level of the output (electric) dynamic range for each electrode / CU. More...
 
std::vector< int > disabled_electrodes_cfg
 Vector containing the indices of any disabled electrodes. More...
 
unsigned int stimulation_order_cfg
 Electrode stimulation order. More...
 
std::default_random_engine random_number_generator_cfg
 Random number generator for randomization of stimulation order. More...
 

Detailed Description

Runtime configuration class for generating an electrodogram from an audio signal, using a stimulation strategy similar to a typical ACE (advanced combination encoder, n-of-m) coding strategy with 22 channels.

Constructor & Destructor Documentation

◆ Ci_simulation_ace_cfg()

Ci_simulation_ace_cfg::Ci_simulation_ace_cfg ( unsigned int  n_electrodes,
mha_real_t  compression_coefficient,
mha_real_t  base_level,
mha_real_t  saturation_level,
std::vector< mha_real_t threshold_level,
std::vector< mha_real_t comfort_level,
std::vector< int >  disabled_electrodes,
unsigned int  stimulation_order,
std::default_random_engine  random_number_generator 
)

Constructor of the runtime configuration class.

Parameters
n_electrodesNumber of active electrodes (cannot be changed at runtime)
compression_coefficientCompression coefficient of the loudness growth function
base_levelBase level of the input (acoustic) dynamic range / Pa
saturation_levelSaturation level of the input (acoustic) dynamic range / Pa
threshold_levelVector containing the threshold level of the output (electric) dynamic range for each electrode / CU
comfort_levelVector containing the comfort level of the output (electric) dynamic range for each electrode / CU
disabled_electrodesVector containing the indices of any disabled electrodes
stimulation_orderElectrode stimulation order
random_number_generatorRandom number generator for randomization of stimulation order

Member Function Documentation

◆ process()

mha_spec_t * Ci_simulation_ace_cfg::process ( mha_spec_t signal,
MHA_AC::waveform_t electrodogram_ac 
)

Process function of the runtime configuration class (main signal processing function).

It leaves the input signal fragment unchanged; its purpose is to compute the AC variable electrodogram_ac for further processing in the plugin chain

Parameters
signalPointer to the current input signal fragment
electrodogram_acAC variable containing a pointer to the electrodogram
Returns
Pointer to the (unchanged) output signal fragment

Member Data Documentation

◆ n_electrodes_cfg

unsigned int Ci_simulation_ace_cfg::n_electrodes_cfg
private

Number of active electrodes (cannot be changed at runtime)

◆ compression_coefficient_cfg

mha_real_t Ci_simulation_ace_cfg::compression_coefficient_cfg
private

Compression coefficient of the loudness growth function.

◆ base_level_cfg

mha_real_t Ci_simulation_ace_cfg::base_level_cfg
private

Base level of the input (acoustic) dynamic range / Pa.

◆ saturation_level_cfg

mha_real_t Ci_simulation_ace_cfg::saturation_level_cfg
private

Saturation level of the input (acoustic) dynamic range / Pa.

◆ threshold_level_cfg

std::vector<mha_real_t> Ci_simulation_ace_cfg::threshold_level_cfg
private

Vector containing the threshold level of the output (electric) dynamic range for each electrode / CU.

◆ comfort_level_cfg

std::vector<mha_real_t> Ci_simulation_ace_cfg::comfort_level_cfg
private

Vector containing the comfort level of the output (electric) dynamic range for each electrode / CU.

◆ disabled_electrodes_cfg

std::vector<int> Ci_simulation_ace_cfg::disabled_electrodes_cfg
private

Vector containing the indices of any disabled electrodes.

◆ stimulation_order_cfg

unsigned int Ci_simulation_ace_cfg::stimulation_order_cfg
private

Electrode stimulation order.

◆ random_number_generator_cfg

std::default_random_engine Ci_simulation_ace_cfg::random_number_generator_cfg
private

Random number generator for randomization of stimulation order.


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