|
Gin
|
Dynamics processor supporting compression, limiting, expansion, and gating. More...
#include <gin_dynamics.h>
Public Types | |
| enum | Type { compressor , limiter , expander , gate , compexp } |
| Dynamics processing types. More... | |
Public Member Functions | |
| Dynamics ()=default | |
| ~Dynamics ()=default | |
| void | setSampleRate (double sampleRate) |
| void | setNumChannels (int ch) |
| void | setMode (Type t) |
| void | setLinked (bool l) |
| void | setParams (float attackS, float holdS, float releaseS, float thresh, float ratio, float kneeWidth) |
| void | setInputGain (float g) |
| void | setOutputGain (float g) |
| void | setAutoMakeupGain (bool enabled) |
| Enables automatic makeup gain for compressor/limiter modes. | |
| void | reset () |
| void | process (juce::AudioSampleBuffer &buffer, juce::AudioSampleBuffer *envelopeOut=nullptr) |
| const LevelTracker & | getInputTracker () |
| const LevelTracker & | getOutputTracker () |
| const LevelTracker & | getReductionTracker () |
| float | calcCurve (float detectorValue) |
Dynamics processor supporting compression, limiting, expansion, and gating.
Dynamics provides a versatile dynamics processing engine that can function as a compressor, limiter, expander, or gate. Based on algorithms from "Designing Audio Effect Plug-ins in C++" by Will Pirkle, it features attack/hold/release envelope detection, adjustable ratio and threshold, soft knee, and optional channel linking for stereo operation.
The compexp mode combines downward compression (above threshold) with upward compression (below the inverted threshold), using the same ratio for both.
Key Features:
Usage:
Dynamics processing types.
Determines the type of dynamics processing applied:
|
default |
|
default |
| void Dynamics::setParams | ( | float | attackS, |
| float | holdS, | ||
| float | releaseS, | ||
| float | thresh, | ||
| float | ratio, | ||
| float | kneeWidth | ||
| ) |
Enables automatic makeup gain for compressor/limiter modes.
When enabled, gain is automatically applied to compensate for the gain reduction, bringing peaks back to 0dB.
| enabled | True to enable auto makeup gain |
| void Dynamics::reset | ( | ) |
| void Dynamics::process | ( | juce::AudioSampleBuffer & | buffer, |
| juce::AudioSampleBuffer * | envelopeOut = nullptr |
||
| ) |
| const LevelTracker & Dynamics::getInputTracker | ( | ) |
| const LevelTracker & Dynamics::getOutputTracker | ( | ) |
| const LevelTracker & Dynamics::getReductionTracker | ( | ) |