|
| void | prepare (double sample_rate) |
| | Sizes the lookahead ring for the worst case in the declared range.
|
| void | reset () |
| | Zeroes the detector and the delay line. Never allocates.
|
| void | set_threshold_db (double db) |
| void | set_ratio (double r) |
| | Positive compression ratio, used when negative-ratio mode is off.
|
| void | set_negative_ratio_mode (bool enabled) |
| | "Infinity+": lets the static curve run with a NEGATIVE ratio, so output keeps falling as input rises past the knee.
|
| void | set_neg_ratio_amount (double r) |
| | The ratio used when negative-ratio mode is on.
|
| void | set_knee_db (double db) |
| | 0 = hard knee; > 0 = OverEasy-style soft knee, total width in dB (±width/2 around threshold).
|
| void | set_time_ms (double ms) |
| | THE time control — one knob for both directions.
|
| void | set_attack_release_ratio_k (double k) |
| | The fixed attack/release lock.
|
| void | set_makeup_db (double db) |
| void | set_lookahead_ms (double ms) |
| | Clamped to the ceiling prepare() sized for, so this can never need an allocation.
|
| void | set_mix (double mix01) |
| | Dry/wet.
|
| void | set_ceiling_db (double db) |
| int | latency_samples () const noexcept |
| | The module's entire latency contribution: the lookahead delay, exactly.
|
| double | static_curve_db (double input_db) const |
| | The static characteristic's output level for an input level, in dB — the gain computer alone, memoryless, with no detector in front of it.
|
| double | gain_computer_db (double input_db) const |
| | Gain reduction in dB (SIGNED, ≤ 0 — see the file doc block) the static curve commands at input_db, after the −ceiling_db floor.
|
| double | gain_computer_unclamped_db (double input_db) const |
| | The same value UNCLAMPED, so a test can show where the floor engages and where it does not.
|
| double | active_ratio () const noexcept |
| | The ratio currently in force: the negative amount in "infinity+" mode, the positive ratio otherwise.
|
| double | gain_reduction_db () const noexcept |
| | Metering taps, as of the last processed sample.
|
| GainReduction | gain_reduction () const noexcept |
| double | level_db () const noexcept |
| double | mean_square () const noexcept |
| double | current_gain_linear () const noexcept |
| double | attack_coef () const noexcept |
| | The detector's two one-pole coefficients, in the a of y += a·(x − y) convention of units::ms_to_onepole_coef.
|
| double | release_coef () const noexcept |
| SampleType | process (SampleType input) |
| void | process_block (SampleType *io, int n) |
template<typename SampleType = float>
class pulp::signal::VcaCompressorT< SampleType >
True-RMS, log-domain, single-time-constant feedforward compressor.
template<typename SampleType = float>
The module's entire latency contribution: the lookahead delay, exactly.
The detector and gain computer are zero-latency, so this is 0 at the default 0 ms lookahead (series law 5). Integer samples, no fractional interpolation, so the figure is exact rather than nominal.
template<typename SampleType = float>
"Infinity+": lets the static curve run with a NEGATIVE ratio, so output keeps falling as input rises past the knee.
Honest gap: no citable primary literature parameterises this. It is an original creative mode — the same continuous gain computer, evaluated at R < 0 and floored by ceiling_db — not a modelled circuit.
template<typename SampleType = float>
The static characteristic's output level for an input level, in dB — the gain computer alone, memoryless, with no detector in front of it.
Exposed so a caller or a test can evaluate the curve directly. The negative-ratio mode passes a NEGATIVE ratio straight through: the shared equation is continuous across the sign, so "infinity+" needs no branch of its own — only the −ceiling_db floor that gain_computer_db() applies below.
template<typename SampleType = float>
Depth beyond which further gain reduction is not applied, as a POSITIVE magnitude; the clamp is −ceiling_db.
Without it the negative-ratio mode's curve is unbounded below. 96 dB is deeper than the noise floor of any programme this will meet, so the clamp is inaudible where it is not wanted and finite where it is. [design parameter] default 96 dB, range 60 .. 144 dB.
template<typename SampleType = float>
Mean-square floor, guarding log10(0) and the denormal range on the detector's recursive state.
1e-12 is −120 dB in power, far below any signal power the detector meets in practice, so it never clips a legitimate low level; the top of the range is still ~30 dB under the quietest audibly relevant level, so raising it inside the range guards harder without masking signal. [design parameter, internal — not a catalog parameter] default 1e-12, range 1e-15 .. 1e-9.
template<typename SampleType = float>
The attack/release LOCK: release τ = k · attack τ.
One control sets both directions in a fixed ratio, which is the architectural claim of this lineage (see the file doc block). Honest gap: no published number exists for a reference Blackmer asymmetry ratio, so this is original engineering — an advanced constant, not a knob users are expected to reach for. [design parameter] default 4.0, range 2 .. 8.