|
Gin
|
Transient shaper - independent control over attack and sustain. More...
#include <gin_transientshaper.h>
Public Member Functions | |
| TransientShaper ()=default | |
| ~TransientShaper ()=default | |
| void | setSampleRate (double sr) |
| void | setAttack (float a) |
| Attack shaping, -4 to +4. | |
| void | setSustain (float s) |
| Sustain shaping, -8 to +8. | |
| void | setDetectorBalance (float b) |
| What the detector listens to: 0 is mid only, 0.5 both, 1 side only. | |
| void | setProcessBalance (float b) |
| Where the gain is applied: 0 is mid only, 0.5 both, 1 side only. | |
| void | setBand (float lowCutHz, float highCutHz) |
| Restricts shaping to a band. | |
| void | setSmoothing (float s) |
| Gain smoothing, 0 (snappy, 10 kHz) to 1 (smooth, 0.1 Hz). | |
| void | setOutputGain (float db) |
| void | reset () |
| void | process (juce::AudioSampleBuffer &buffer) |
Transient shaper - independent control over attack and sustain.
Unlike a compressor, there is no threshold. The gain comes from the ratio between three envelope followers running on the same detector signal: a fast one (100 Hz), a baseline (10 Hz) and a slow one (1 Hz). When the fast envelope runs ahead of the baseline the signal is in its attack; when the slow one sits above the baseline it is in its tail. Because both are ratios, the effect is level independent - it works the same on a quiet drum loop as on a hot one, with nothing to re-tune as the source changes.
Positive attack sharpens transients, negative softens them. Positive sustain lengthens the tail, negative shortens it - a quick way to dry out an over-reverberant room mic.
Key Features:
Usage:
Note: stereo only - process() expects a two channel buffer.
|
default |
|
default |
Attack shaping, -4 to +4.
Positive sharpens, negative softens, 0 is neutral.
Sustain shaping, -8 to +8.
Positive lengthens the tail, negative shortens it.
What the detector listens to: 0 is mid only, 0.5 both, 1 side only.
Where the gain is applied: 0 is mid only, 0.5 both, 1 side only.
Restricts shaping to a band.
Everything outside it is passed through dry and unshaped, so a 40-200 Hz band shapes the kick and leaves the rest of the mix alone.
| lowCutHz | bottom of the shaped band, 0 for no low cut |
| highCutHz | top of the shaped band, 0 or >= nyquist for none |
Gain smoothing, 0 (snappy, 10 kHz) to 1 (smooth, 0.1 Hz).
| void TransientShaper::reset | ( | ) |
References Biquad::reset().
Referenced by setSampleRate().
| void TransientShaper::process | ( | juce::AudioSampleBuffer & | buffer | ) |
References Biquad::process().