|
| void | prepare (double sample_rate) |
| | Sizes both delay buffers for the widest sweep any mode can ask for and prepares the composed engines.
|
| void | reset () |
| | Rewinds every buffer, filter, oscillator and generator.
|
| void | discard_history () noexcept |
| | Constant-time audio fault recovery.
|
| void | set_mode (Mode mode) |
| | Takes effect through a kModeSwitchMs transition rather than instantly.
|
| Mode | mode () const |
| void | set_polarity (Polarity polarity) |
| Polarity | polarity () const |
| void | set_delay_engine (Engine engine) |
| Engine | delay_engine () const |
| void | set_rate_hz (double hz) |
| void | set_waveform (Wave wave) |
| void | set_stereo_spread (double cycles01) |
| | Stereo spread in CYCLES of the sweep, in the range [0, 0.5].
|
| void | set_depth_ms (double ms) |
| | Modulation excursion.
|
| double | depth_ms () const |
| void | set_center_delay_ms (double ms) |
| double | center_delay_ms () const |
| void | set_offset_ms (double ms) |
| double | offset_ms () const |
| void | set_feedback (double fb) |
| | Resonance, in the range [-kFbClamp, +kFbClamp].
|
| double | feedback () const |
| void | set_mix (double wet01) |
| | Equal-power dry/wet, in the range [0, 1].
|
| double | mix () const |
| void | set_barberpole_shift_hz (double hz) |
| | Barberpole shift in Hz. Positive climbs, negative descends.
|
| double | barberpole_shift_hz () const |
| void | process (const SampleType *in, SampleType *out, int n) |
| void | process_stereo (const SampleType *in_left, const SampleType *in_right, SampleType *out_left, SampleType *out_right, int n) |
| int | latency_samples () const noexcept |
| | Zero in classic and barberpole modes — the dry path is a direct passthrough and the mix is a gain, not a resampling.
|
| double | effective_depth_ms () const |
| | The excursion actually in force, after the mode's clamp.
|
| double | instantaneous_delay_ms (int channel=0) const |
| | The delay the modulated line was last read at, in ms.
|
| int | fixed_delay_samples () const noexcept |
| | The fixed dry delay in samples, exact and integer.
|
|
| static double | notch_hz (int k, double delay_ms, Polarity polarity) |
| | Notch frequencies of the comb at a given delay, from Δf = 1/D.
|
| static double | notch_spacing_hz (double delay_ms) |
| | Spacing between adjacent notches — the reciprocal of the delay, for either polarity.
|
| static constexpr double | worst_case_gain () |
| | The bound the Forge registry cites (series law 8): the steady-state envelope of a recursive comb at the feedback ceiling.
|
| static void | mix_gains (double wet01, double &dry_gain, double &wet_gain) |
| | The dry and wet weights the shipped equal-power law produces at a given mix.
|
|
| static constexpr double | kFbClamp = 0.97 |
| | Feedback ceiling.
|
| static constexpr double | kLoopElementGainBound = 1.012 |
| | Supremum of every non-coefficient element in the feedback loop, with headroom over the measured values quoted in the file doc block.
|
| static constexpr double | kDcBlockHz = 5.0 |
| | Corner of the DC blocker in the feedback return.
|
| static constexpr double | kDepthMinMs = 0.02 |
| | Modulation excursion bounds. [design parameter] 0.02 .. 4.0 ms.
|
| static constexpr double | kDepthMaxMs = 4.0 |
| static constexpr double | kCenterMinMs = 0.1 |
| | Classic-mode comb base delay — the flanging end of the delay-modulation family, deliberately stopping short of chorus territory.
|
| static constexpr double | kCenterMaxMs = 10.0 |
| static constexpr double | kOffsetMinMs = 0.5 |
| | Through-zero fixed dry delay — the crossing point.
|
| static constexpr double | kOffsetMaxMs = 10.0 |
| static constexpr double | kRateMinHz = 0.02 |
| | Sweep rate. [design parameter] 0.02 .. 10.0 Hz.
|
| static constexpr double | kRateMaxHz = 10.0 |
| static constexpr double | kMinClassicDelayMs = 0.05 |
| | Floor the classic-mode delay may never go below.
|
| static constexpr int | kInterpGuardSamples = 2 |
| | Fixed extra history the delay buffer reserves so the 4-point kernel's taps never reach past the valid region, however small the delay gets.
|
| static constexpr double | kControlSmoothMs = 3.0 |
| | De-zippering time for the delay-time target.
|
| static constexpr double | kModeSwitchMs = 5.0 |
| | Mode-change transition window.
|
| static constexpr double | kBarberpoleShiftMaxHz = 20.0 |
| | Barberpole shift ceiling.
|
| static constexpr double | kBbdCharacter = 0.5 |
| | The BBD engine's character amount — how hard its clock jitter and compander are driven.
|
template<typename SampleType = float>
class pulp::signal::FlangerT< SampleType >
The flanger.
template<typename SampleType = float>
The excursion actually in force, after the mode's clamp.
Classic: the sweep is subtracted from the centre at the LFO's trough, so an unclamped depth can drive the delay negative — the catalog's own extremes do it (centre 0.1 ms against depth 4.0 ms asks for −3.9 ms). The excursion is clamped against the centre so D(t) ≥ kMinClassicDelayMs holds by construction.
Through-zero: the sweep is about the offset and must not go negative either, so the excursion is capped at the offset — which is exactly the full 0 .. 2·offset sweep, the maximum musical setting.
template<typename SampleType = float>
Zero in classic and barberpole modes — the dry path is a direct passthrough and the mix is a gain, not a resampling.
In through-zero mode the dry path genuinely carries the fixed offset, so the latency is real and is reported exactly: the offset line is an INTEGER-sample buffer (nothing sweeps it, so it needs no fractional accuracy), which is what keeps this an exact integer rather than a rounded approximation of a fractional read.
Reported for the TARGET mode the instant set_mode is called, not at the end of the transition window. A host reads latency on the control thread and re-aligns on its own schedule; handing it the outgoing mode's figure for five more milliseconds would give it a number that is already wrong by the time it acts on it.
template<typename SampleType = float>
Stereo spread in CYCLES of the sweep, in the range [0, 0.5].
The house default is a quarter cycle: far enough apart that the two channels decorrelate into real width. This is a PHASE control, not a waveform-normalized width control: a half-cycle is exact inversion for sine, triangle and square, but not for either saw. Saw still responds to every offset; its stereo width simply does not vary monotonically by the same law as the odd-symmetric shapes because its wrap discontinuity moves between rails.
template<typename SampleType = float>
The BBD engine's character amount — how hard its clock jitter and compander are driven.
Fixed here rather than exposed: the flanger's parameter surface is about the comb, and a second character axis would duplicate the delay module's own. [design parameter] default 0.5, range 0 .. 1.
template<typename SampleType = float>
Corner of the DC blocker in the feedback return.
Without it, rounding in the fractional read accumulates a DC component over a long high-feedback render, and there is no saturator here to bound it. [design parameter] default 5 Hz, range 2 .. 10 Hz.
template<typename SampleType = float>
Supremum of every non-coefficient element in the feedback loop, with headroom over the measured values quoted in the file doc block.
The spec's calibration table calls this kInterpGainBound and attributes it to the interpolator. It is renamed because that attribution is measurably wrong: the 4-point Lagrange kernel's magnitude never exceeds 1.000 anywhere in the band, at any fractional offset. The element that can exceed unity is the feedback DC blocker, and the BBD engine's small-signal peak sits just above it. The shipped default is unchanged so the registry figure does not move. [design parameter] default 1.012, range 1.000 .. 1.020.