#include <compressor.hpp>
|
| static SampleType | detector_level_db (SampleType detector) |
| | Detector level in dB for one sample: 20 log10(|x|), floored at -200 dB.
|
| static SampleType | gain_computer_db (SampleType input_db, const Params ¶ms) |
| | The static curve: gain change in dB (<= 0) for a detector level in dB under params (threshold, ratio and knee; attack, release and makeup do not enter).
|
| static SampleType | ballistic_coefficient (SampleType time_ms, SampleType sample_rate) |
| | One-pole smoothing coefficient for a time constant in ms: 1 - exp(-1 / (tau fs)), or 1 (instant) for a non-positive time.
|
| static SampleType | branching_step (SampleType envelope, SampleType target, SampleType attack, SampleType release) |
| | One step of the branching ballistics: the envelope (gain change in dB) moves toward target with the attack coefficient when more reduction is asked for and the release coefficient otherwise.
|
| static SampleType | decoupled_hold (SampleType hold, SampleType target, SampleType release) |
| | The decoupled ballistics' peak hold on gain changes (<= 0 dB): it jumps to any deeper reduction at once and otherwise decays toward the target with the release coefficient (Giannoulis et al.
|
| static SampleType | db_to_gain (SampleType db) |
| | Linear gain for a gain change in dB (FastMath for float).
|
◆ attack_coefficient()
template<typename SampleType = float>
Envelope smoothing coefficients in force for the current parameters and sample rate: the per-sample step toward a lower (attack) or higher (release) gain target is coefficient * (target_db - envelope_db).
◆ ballistic_coefficient()
template<typename SampleType = float>
One-pole smoothing coefficient for a time constant in ms: 1 - exp(-1 / (tau fs)), or 1 (instant) for a non-positive time.
◆ ballistics()
template<typename SampleType = float>
◆ branching_step()
template<typename SampleType = float>
| SampleType pulp::signal::CompressorT< SampleType >::branching_step |
( |
SampleType | envelope, |
|
|
SampleType | target, |
|
|
SampleType | attack, |
|
|
SampleType | release ) |
|
inlinestatic |
One step of the branching ballistics: the envelope (gain change in dB) moves toward target with the attack coefficient when more reduction is asked for and the release coefficient otherwise.
◆ db_to_gain()
template<typename SampleType = float>
Linear gain for a gain change in dB (FastMath for float).
◆ decoupled_hold()
template<typename SampleType = float>
| SampleType pulp::signal::CompressorT< SampleType >::decoupled_hold |
( |
SampleType | hold, |
|
|
SampleType | target, |
|
|
SampleType | release ) |
|
inlinestatic |
The decoupled ballistics' peak hold on gain changes (<= 0 dB): it jumps to any deeper reduction at once and otherwise decays toward the target with the release coefficient (Giannoulis et al.
's y1 = max(x, aR y1 + (1 - aR) x) with the sign flipped). The envelope then follows the hold: envelope + attack * (hold - envelope).
◆ detector_level_db()
template<typename SampleType = float>
Detector level in dB for one sample: 20 log10(|x|), floored at -200 dB.
Float uses FastMath's branch-free conversion.
◆ gain_computer_db()
template<typename SampleType = float>
The static curve: gain change in dB (<= 0) for a detector level in dB under params (threshold, ratio and knee; attack, release and makeup do not enter).
Written as selects over precomputed candidates so the block path's static-curve pass vectorizes.
◆ gain_reduction()
template<typename SampleType = float>
Canonical non-negative gain-reduction magnitude for shared meters.
◆ gain_reduction_db()
template<typename SampleType = float>
◆ latency_samples()
template<typename SampleType = float>
Latency reported to the host = lookahead in samples (0 when off).
◆ lookahead_ms()
template<typename SampleType = float>
◆ process() [1/2]
template<typename SampleType = float>
Process a block in place; the buffer is also the sidechain.
Same as process_with_sidechain(buffer, buffer, num_samples).
◆ process() [2/2]
template<typename SampleType = float>
Process one sample.
The sidechain signal defaults to input, matching the original non-sidechain behavior.
◆ process_with_sidechain() [1/2]
template<typename SampleType = float>
| void pulp::signal::CompressorT< SampleType >::process_with_sidechain |
( |
SampleType * | buffer, |
|
|
const SampleType * | sidechain, |
|
|
int | num_samples ) |
|
inline |
Process a block with a separate sidechain input.
Both buffers must be at least num_samples long.
Equivalent to calling process_with_sidechain(SampleType, SampleType) per sample, including the reset at a non-finite sample, but run in kSnapChunkSamples chunks of three passes each (detector and static curve, envelope recursion, gain), so the transcendental work in the outer passes vectorizes. The float path computes the same values; the envelope's denormal snap runs once per chunk (see run_chunks()).
◆ process_with_sidechain() [2/2]
template<typename SampleType = float>
Process one sample with an explicit sidechain detector input.
sidechain is the signal that drives the envelope follower; input is the signal that gets the gain applied.
◆ release_coefficient()
template<typename SampleType = float>
◆ reset()
template<typename SampleType = float>
◆ set_ballistics()
template<typename SampleType = float>
Select how gain reduction is smoothed (see CompressorBallistics).
Takes effect from the next sample; the detector state carries over.
◆ set_lookahead_ms()
template<typename SampleType = float>
Set the lookahead in milliseconds.
The dry input is delayed by this amount so the envelope follower can react before the transient arrives. 0 disables lookahead (default). Maximum supported lookahead is 50 ms — beyond that the internal ring buffer is too large for low-latency contexts.
◆ set_params()
template<typename SampleType = float>
◆ set_sample_rate()
template<typename SampleType = float>
◆ set_sidechain_hpf_hz()
template<typename SampleType = float>
Set the sidechain high-pass cutoff (Hz).
0 disables the HPF and the sidechain detector sees the raw signal. Typical values: 80–200 Hz for "duck on bass" prevention. The filter is a second-order Butterworth biquad (Q ≈ 0.707).
◆ sidechain_hpf_hz()
template<typename SampleType = float>
The documentation for this class was generated from the following file:
- /home/runner/work/pulp/pulp/core/signal/include/pulp/signal/compressor.hpp