SAF
|
A frequency-dependent Ambisonic sound scene dynamic range compressor (DRC) More...
Go to the source code of this file.
Functions | |
void | ambi_drc_create (void **const phAmbi) |
Creates an instance of the ambi_drc. | |
void | ambi_drc_destroy (void **const phAmbi) |
Destroys an instance of the ambi_drc. | |
void | ambi_drc_init (void *const hAmbi, int sampleRate) |
Initialises an instance of ambi_drc with default settings. | |
void | ambi_drc_process (void *const hAmbi, const float *const *inputs, float *const *const outputs, int nCh, int nSamples) |
Applies the frequency-dependent dynamic range compression to the input spherical harmonic signals. | |
void | ambi_drc_refreshSettings (void *const hAmbi) |
Sets all intialisation flags to 1; re-initialising all settings/variables as ambi_drc is currently configured, at next available opportunity. | |
void | ambi_drc_setThreshold (void *const hAmbi, float newValue) |
Sets the compressor threshold value in DECIBELS. | |
void | ambi_drc_setRatio (void *const hAmbi, float newValue) |
Sets the compression ratio. | |
void | ambi_drc_setKnee (void *const hAmbi, float newValue) |
Sets the compressor knee value; 0: hard knee, >0: soft knee, in DECIBELS. | |
void | ambi_drc_setInGain (void *const hAmbi, float newValue) |
Sets the compressor input gain value, in DECIBELS. | |
void | ambi_drc_setOutGain (void *const hAmbi, float newValue) |
Sets the compressor output gain value, in DECIBELS. | |
void | ambi_drc_setAttack (void *const hAmbi, float newValue) |
Sets the compressor envelope attack time, in miliseconds. | |
void | ambi_drc_setRelease (void *const hAmbi, float newValue) |
Sets the compressor envelope release time, in miliseconds. | |
void | ambi_drc_setChOrder (void *const hAmbi, int newOrder) |
Sets the Ambisonic channel ordering convention to decode with, in order to match the convention employed by the input signals (see CH_ORDER enum) | |
void | ambi_drc_setNormType (void *const hAmbi, int newType) |
Sets the Ambisonic normalisation convention to decode with, in order to match with the convention employed by the input signals (see NORM_TYPES enum) | |
void | ambi_drc_setInputPreset (void *const hAmbi, SH_ORDERS newPreset) |
Sets processing order. | |
int | ambi_drc_getFrameSize (void) |
Returns the processing framesize (i.e., number of samples processed with every _process() call ) | |
float | ambi_drc_getThreshold (void *const hAmbi) |
Returns the compressor threshold value, in DECIBELS. | |
float | ambi_drc_getRatio (void *const hAmbi) |
Returns the compression ratio. | |
float | ambi_drc_getKnee (void *const hAmbi) |
Returns the compressor knee value 0: hard knee, >0: soft knee, in DECIBELS. | |
float | ambi_drc_getInGain (void *const hAmbi) |
Returns the compressor input gain value, in DECIBELS. | |
float | ambi_drc_getOutGain (void *const hAmbi) |
Returns the compressor output gain value, in DECIBELS. | |
float | ambi_drc_getAttack (void *const hAmbi) |
Returns the compressor envelope attack time, in miliseconds. | |
float | ambi_drc_getRelease (void *const hAmbi) |
Returns the compressor envelope release time, in miliseconds. | |
int | ambi_drc_getChOrder (void *const hAmbi) |
Returns the Ambisonic channel ordering convention currently being used to decode with, which should match the convention employed by the input signals (see CH_ORDER enum) | |
int | ambi_drc_getNormType (void *const hAmbi) |
Returns the Ambisonic normalisation convention currently being usedto decode with, which should match the convention employed by the input signals (see NORM_TYPES enum) | |
SH_ORDERS | ambi_drc_getInputPreset (void *const hAmbi) |
Returns the current processing order (see SH_ORDERS enum) | |
int | ambi_drc_getNSHrequired (void *const hAmbi) |
Returns the number of spherical harmonic signals required by the current decoding order: (current_order+1)^2. | |
int | ambi_drc_getSamplerate (void *const hAmbi) |
Returns the DAW/Host sample rate. | |
int | ambi_drc_getProcessingDelay () |
Returns the processing delay in samples; may be used for delay compensation features. | |
A frequency-dependent Ambisonic sound scene dynamic range compressor (DRC)
The implementation can also keep track of the frequency-dependent gain factors for the omnidirectional component over time (for optional plotting). The design is based on the algorithm presented in [1].
The DRC gain factors per band are determined based on the omnidirectional component, which are then applied to all of the higher-order components; thus, the spatial information of the Ambisonic sound scene is retained (although, your perception of them may change due to the DRC).
Definition in file ambi_drc.c.
void ambi_drc_create | ( | void **const | phAmbi | ) |
Creates an instance of the ambi_drc.
[in] | phAmbi | (&) address of ambi_drc handle |
Definition at line 43 of file ambi_drc.c.
void ambi_drc_destroy | ( | void **const | phAmbi | ) |
Destroys an instance of the ambi_drc.
[in] | phAmbi | (&) address of ambi_drc handle |
Definition at line 82 of file ambi_drc.c.
float ambi_drc_getAttack | ( | void *const | hAmbi | ) |
Returns the compressor envelope attack time, in miliseconds.
Definition at line 383 of file ambi_drc.c.
int ambi_drc_getChOrder | ( | void *const | hAmbi | ) |
Returns the Ambisonic channel ordering convention currently being used to decode with, which should match the convention employed by the input signals (see CH_ORDER enum)
Definition at line 395 of file ambi_drc.c.
int ambi_drc_getFrameSize | ( | void | ) |
Returns the processing framesize (i.e., number of samples processed with every _process() call )
Definition at line 318 of file ambi_drc.c.
float ambi_drc_getInGain | ( | void *const | hAmbi | ) |
Returns the compressor input gain value, in DECIBELS.
Definition at line 371 of file ambi_drc.c.
SH_ORDERS ambi_drc_getInputPreset | ( | void *const | hAmbi | ) |
Returns the current processing order (see SH_ORDERS enum)
Definition at line 407 of file ambi_drc.c.
float ambi_drc_getKnee | ( | void *const | hAmbi | ) |
Returns the compressor knee value 0: hard knee, >0: soft knee, in DECIBELS.
Definition at line 365 of file ambi_drc.c.
int ambi_drc_getNormType | ( | void *const | hAmbi | ) |
Returns the Ambisonic normalisation convention currently being usedto decode with, which should match the convention employed by the input signals (see NORM_TYPES enum)
Definition at line 401 of file ambi_drc.c.
int ambi_drc_getNSHrequired | ( | void *const | hAmbi | ) |
Returns the number of spherical harmonic signals required by the current decoding order: (current_order+1)^2.
Definition at line 413 of file ambi_drc.c.
float ambi_drc_getOutGain | ( | void *const | hAmbi | ) |
Returns the compressor output gain value, in DECIBELS.
Definition at line 377 of file ambi_drc.c.
int ambi_drc_getProcessingDelay | ( | void | ) |
Returns the processing delay in samples; may be used for delay compensation features.
Definition at line 425 of file ambi_drc.c.
float ambi_drc_getRatio | ( | void *const | hAmbi | ) |
Returns the compression ratio.
Definition at line 359 of file ambi_drc.c.
float ambi_drc_getRelease | ( | void *const | hAmbi | ) |
Returns the compressor envelope release time, in miliseconds.
Definition at line 389 of file ambi_drc.c.
int ambi_drc_getSamplerate | ( | void *const | hAmbi | ) |
Returns the DAW/Host sample rate.
Definition at line 419 of file ambi_drc.c.
float ambi_drc_getThreshold | ( | void *const | hAmbi | ) |
Returns the compressor threshold value, in DECIBELS.
Definition at line 353 of file ambi_drc.c.
void ambi_drc_init | ( | void *const | hAmbi, |
int | samplerate ) |
Initialises an instance of ambi_drc with default settings.
[in] | hAmbi | ambi_drc handle |
[in] | samplerate | Host samplerate. |
Definition at line 105 of file ambi_drc.c.
void ambi_drc_process | ( | void *const | hAmbi, |
const float *const * | inputs, | ||
float *const * | outputs, | ||
int | nCH, | ||
int | nSamples ) |
Applies the frequency-dependent dynamic range compression to the input spherical harmonic signals.
[in] | hAmbi | ambi_drc handle |
[in] | inputs | Input channel buffers; 2-D array: nCH x nSamples |
[in] | outputs | Output channel buffers; 2-D array: nCH x nSamples |
[in] | nCH | Number of input/output channels |
[in] | nSamples | Number of samples in 'inputs'/'output' matrices |
Definition at line 136 of file ambi_drc.c.
void ambi_drc_refreshSettings | ( | void *const | hAmbi | ) |
Sets all intialisation flags to 1; re-initialising all settings/variables as ambi_drc is currently configured, at next available opportunity.
Definition at line 239 of file ambi_drc.c.
void ambi_drc_setAttack | ( | void *const | hAmbi, |
float | newValue ) |
Sets the compressor envelope attack time, in miliseconds.
Definition at line 275 of file ambi_drc.c.
void ambi_drc_setChOrder | ( | void *const | hAmbi, |
int | newOrder ) |
Sets the Ambisonic channel ordering convention to decode with, in order to match the convention employed by the input signals (see CH_ORDER enum)
Definition at line 287 of file ambi_drc.c.
void ambi_drc_setInGain | ( | void *const | hAmbi, |
float | newValue ) |
Sets the compressor input gain value, in DECIBELS.
Definition at line 263 of file ambi_drc.c.
void ambi_drc_setInputPreset | ( | void *const | hAmbi, |
SH_ORDERS | newPreset ) |
Sets processing order.
If input order is set higher than the input signal order, the extra required channels are filled with zeros. If the input order is set lower than the input signal order, the number input signals are truncated accordingly (see SH_ORDERS enum)
Definition at line 301 of file ambi_drc.c.
void ambi_drc_setKnee | ( | void *const | hAmbi, |
float | newValue ) |
Sets the compressor knee value; 0: hard knee, >0: soft knee, in DECIBELS.
Definition at line 257 of file ambi_drc.c.
void ambi_drc_setNormType | ( | void *const | hAmbi, |
int | newType ) |
Sets the Ambisonic normalisation convention to decode with, in order to match with the convention employed by the input signals (see NORM_TYPES enum)
Definition at line 294 of file ambi_drc.c.
void ambi_drc_setOutGain | ( | void *const | hAmbi, |
float | newValue ) |
Sets the compressor output gain value, in DECIBELS.
Definition at line 269 of file ambi_drc.c.
void ambi_drc_setRatio | ( | void *const | hAmbi, |
float | newValue ) |
Sets the compression ratio.
Definition at line 251 of file ambi_drc.c.
void ambi_drc_setRelease | ( | void *const | hAmbi, |
float | newValue ) |
Sets the compressor envelope release time, in miliseconds.
Definition at line 281 of file ambi_drc.c.
void ambi_drc_setThreshold | ( | void *const | hAmbi, |
float | newValue ) |
Sets the compressor threshold value in DECIBELS.
Definition at line 245 of file ambi_drc.c.