Compressor inspired by https://github.com/YetAnotherElectronicsChannel/STM32_DSP_COMPRESSOR/blob/master/code/Src/main.c.
More...
#include <AudioEffect.h>
|
| | Compressor (const Compressor ©)=default |
| | Copy Constructor.
|
| |
| | Compressor (uint32_t sampleRate=44100, uint16_t attackMs=30, uint16_t releaseMs=20, uint16_t holdMs=10, uint8_t thresholdPercent=10, float compressionRatio=0.5) |
| | Default Constructor.
|
| |
| virtual bool | active () |
| | determines if the effect is active
|
| |
| Compressor * | clone () |
| |
| int | id () |
| | Allows to identify an effect.
|
| |
| effect_t | process (effect_t input) |
| | Processes the sample.
|
| |
| virtual void | setActive (bool value) |
| | sets the effect active/inactive
|
| |
| void | setAttack (uint16_t attackMs) |
| | Defines the attack duration in ms.
|
| |
| void | setCompressionRatio (float compressionRatio) |
| | Defines the compression ratio from 0 to 1.
|
| |
| void | setHold (uint16_t holdMs) |
| | Defines the hold duration in ms.
|
| |
| void | setId (int id) |
| | Allows to identify an effect.
|
| |
| void | setRelease (uint16_t releaseMs) |
| | Defines the release duration in ms.
|
| |
| void | setThresholdPercent (uint8_t thresholdPercent) |
| | Defines the threshod in %.
|
| |
◆ CompStates
| Enumerator |
|---|
| S_NoOperation | |
| S_Attack | |
| S_GainReduction | |
| S_Release | |
◆ Compressor() [1/2]
◆ Compressor() [2/2]
| Compressor |
( |
uint32_t |
sampleRate = 44100, |
|
|
uint16_t |
attackMs = 30, |
|
|
uint16_t |
releaseMs = 20, |
|
|
uint16_t |
holdMs = 10, |
|
|
uint8_t |
thresholdPercent = 10, |
|
|
float |
compressionRatio = 0.5 |
|
) |
| |
|
inline |
◆ active()
determines if the effect is active
◆ clip()
| int16_t clip |
( |
int32_t |
in, |
|
|
int16_t |
clipLimit = 32767, |
|
|
int16_t |
resultLimit = 32767 |
|
) |
| |
|
inlineprotectedinherited |
◆ clone()
◆ compress()
| float compress |
( |
float |
inSampleF | ) |
|
|
inlineprotected |
◆ copyParent()
◆ id()
Allows to identify an effect.
◆ process()
◆ recalculate()
◆ setActive()
| virtual void setActive |
( |
bool |
value | ) |
|
|
inlinevirtualinherited |
sets the effect active/inactive
◆ setAttack()
| void setAttack |
( |
uint16_t |
attackMs | ) |
|
|
inline |
Defines the attack duration in ms.
◆ setCompressionRatio()
| void setCompressionRatio |
( |
float |
compressionRatio | ) |
|
|
inline |
Defines the compression ratio from 0 to 1.
◆ setHold()
| void setHold |
( |
uint16_t |
holdMs | ) |
|
|
inline |
Defines the hold duration in ms.
◆ setId()
Allows to identify an effect.
◆ setRelease()
| void setRelease |
( |
uint16_t |
releaseMs | ) |
|
|
inline |
Defines the release duration in ms.
◆ setThresholdPercent()
| void setThresholdPercent |
( |
uint8_t |
thresholdPercent | ) |
|
|
inline |
Defines the threshod in %.
◆ active_flag
◆ attack_count
◆ gain
◆ gain_step_attack
◆ gain_step_release
◆ gainreduce
◆ hold_count
◆ id_value
◆ release_count
◆ sample_rate
◆ state
◆ threshold
◆ timeout
The documentation for this class was generated from the following file: