|
Gin
|
Envelope follower for dynamics processing. More...
#include <gin_dynamics.h>
Public Types | |
| enum | Mode { peak , ms , rms } |
| Envelope detection modes. More... | |
Public Member Functions | |
| EnvelopeDetector ()=default | |
| ~EnvelopeDetector ()=default | |
| void | setSampleRate (double f) |
| void | setParams (float attackS, float holdS, float releaseS, bool analogTC, Mode detect, bool logDetector) |
| void | reset () |
| float | process (float input) |
Protected Member Functions | |
| void | setAttackTime (float attackS) |
| void | setHoldTime (float holdS) |
| void | setReleaseTime (float releaseS) |
Protected Attributes | |
| double | sampleRate = 44100.0 |
| Mode | mode = peak |
| float | attackTime = 0.0f |
| float | releaseTime = 0.0f |
| float | envelope = 0.0 |
| float | holdTime = 0.0f |
| float | holdRemaining = 0.0f |
| bool | analogTC = false |
| bool | logDetector = false |
Envelope follower for dynamics processing.
EnvelopeDetector tracks the amplitude envelope of an audio signal using configurable attack, hold, and release times. It supports multiple detection modes (peak, mean-square, RMS) and can use analog-style or digital time constants for natural or precise envelope following.
Key Features:
The envelope detector is the core component for gain reduction calculations in dynamics processors, providing a smooth representation of signal level over time.
Envelope detection modes.
Determines how the input signal is converted to an envelope value:
| Enumerator | |
|---|---|
| peak | Peak detection (absolute value) |
| ms | Mean square detection. |
| rms | RMS (root mean square) detection. |
|
default |
|
default |
References sampleRate.
| void EnvelopeDetector::setParams | ( | float | attackS, |
| float | holdS, | ||
| float | releaseS, | ||
| bool | analogTC, | ||
| Mode | detect, | ||
| bool | logDetector | ||
| ) |
| void EnvelopeDetector::reset | ( | ) |
|
protected |
Referenced by setSampleRate().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |