Stereo Flanger — User Guide
A causal fractional-delay flanger with a true recursive feedback loop, sinusoidal delay modulation, and phase-offset stereo trajectories.
What this does
Stereo Flanger combines the source with a short, sinusoidally modulated delay. The changing delay continuously moves the comb-filter peaks and notches through the spectrum. A recursive feedback state can reinforce or reshape those resonances, while a phase offset between two modulation trajectories creates stereo motion.
The implementation is fully causal. Delay time is never allowed below one sample, and delayed reads use linear fractional interpolation rather than rounded sample positions. This gives a continuously moving delay trajectory without integer-sample stepping.
Signal flow
1. Delay trajectory
For each output sample, the script calculates a fractional read position from a sinusoidal delay:
2. Recursive feedback state
The delayed state is read with linear interpolation between neighboring samples. Because the formula proceeds causally through the Sound, earlier processed samples become the feedback memory for later samples.
3. Final Dry/Wet output
At 0% Wet, the script uses a separate exact-bypass path: the selected Sound is copied directly and no feedback processing or Safety Peak scaling is applied.
Delay modulation
Base Delay sets the center of the moving delay and Depth sets the excursion around it. The script automatically keeps the complete trajectory causal:
If the requested settings would drive the delay below one sample, the effective values are clamped and the Info window reports that a causal delay clamp was applied.
Local-time LFO
The LFO phase uses local Sound time, measured from the Sound's own start. Moving an otherwise identical Sound to another xmin therefore does not change the flanger trajectory.
Through-Zero preset
Through-Zero (Simulated) uses a very short base delay and a depth that approaches the one-sample causal limit. It does not implement true through-zero flanging, because a true crossing through zero would require delaying the dry reference as well so the modulated branch could pass from lagging to leading it.
Recursive feedback
Feedback is clamped internally to −0.98…+0.98 so the recursive loop remains below unity magnitude.
Positive feedback
Reinforces the recursive state with the same sign. Increasing the value makes the static comb response more sharply resonant.
Negative feedback
Feeds the delayed state back with inverted sign, changing which regions of the comb response are emphasized.
The feedback is applied inside the state recursion itself; it is not a one-reflection approximation and it is not simply an extra delayed copy mixed after processing.
Stereo & channel behavior
Mono input
When processing is active, mono input is converted to stereo. Channel 1 uses the left LFO trajectory and channel 2 uses the phase-offset right trajectory.
Existing stereo or multichannel input
The original channel count is preserved. Channels are not summed or cross-fed:
Each channel has its own recursive feedback history. The only shared information is the parameter set and the odd/even phase-routing rule.
Phase offset
The entered phase is wrapped into 0…360°. A value of 0° gives matching delay trajectories; 180° gives counter-sweeping odd/even trajectories. The phase offset changes modulation timing between channel groups, not the polarity of the audio signal itself.
Presets
| Preset | Rate | Depth | Base | Phase | Feedback | Wet |
|---|---|---|---|---|---|---|
| Custom | form value | form value | form value | form value | form value | form value |
| Classic 80s Flanger | 0.5 Hz | 1.5 ms | 2.0 ms | 90° | +0.60 | 50% |
| Slow Jet (High Feedback) | 0.15 Hz | 2.5 ms | 3.0 ms | 180° | +0.85 | 50% |
| Liquid Metal (Negative FB) | 3.0 Hz | 0.5 ms | 1.0 ms | 180° | −0.70 | 60% |
| Deep Throat (Long Delay) | 0.4 Hz | 4.0 ms | 8.0 ms | 45° | +0.50 | 50% |
| Through-Zero (Simulated) | 0.2 Hz | 0.9 ms | 1.0 ms | 180° | +0.40 | 70% |
| Subtle Stereo Widener | 0.1 Hz | 1.0 ms | 5.0 ms | 180° | +0.10 | 40% |
Parameters
| Parameter | Default | What it controls | Runtime handling |
|---|---|---|---|
| Rate Hz | 0.3 | Sinusoidal sweep rate. | Negative values become 0. |
| Depth ms | 2.0 | Peak delay excursion around the base delay. | Minimum 0; reduced automatically if necessary to retain at least one-sample delay. |
| Base delay ms | 3.0 | Center delay of the flanger trajectory. | Minimum one sample. |
| Stereo phase offset deg | 180 | Phase difference between odd- and even-channel LFO trajectories. | Wrapped into 0…360°. |
| Feedback | 0.7 | Recursive feedback coefficient. | Clamped to −0.98…+0.98. |
| Dry/Wet percent | 50 | Blend between untouched source and delayed recursive state. | Clamped to 0…100%; 0 uses exact bypass. |
| Safety peak | 0.99 | Maximum permitted peak after active processing. | Clamped to 0…1; 0 disables safety; attenuation only. |
| Draw visualization | yes | Creates the AudioTools figure. | Does not change audio. |
| Play result | yes | Plays the finished Sound. | Does not change audio. |
Safety Peak
After active processing, the script measures the peak. It scales the Sound only when that peak exceeds Safety Peak. Material already below the ceiling is left unchanged.
Output properties
| Property | Behavior |
|---|---|
| Mono + active effect | Becomes stereo. |
| Stereo / multichannel + active effect | Original channel count is preserved. |
| 0% Wet | Exact copied bypass; original channel count is preserved, including mono. |
| Sample rate | Preserved. |
| Duration / sample count | Preserved. |
| Start time | Preserved. |
| Randomness | None. Processing is deterministic. |
Visualization
When Draw visualization is enabled, v0.4 creates the AudioTools house layout:
Input
Original waveform.
Output
Final processed waveform.
Delay trajectory
Left/odd and right/even delay curves over the first up to 3 seconds, with the effective base delay shown as a reference line.
Static transfer @ base delay
The magnitude response predicted from the actual recursive-feedback transfer function at the effective base delay, using the current Feedback and Dry/Wet values.
Static transfer function
For the fixed base-delay snapshot, the visualization corresponds to:
This panel is a static reference for the base delay. During actual processing, the delay is moving according to the LFO, so the comb response sweeps continuously through time.
Summary strip
The summary reports rate, effective base/depth, phase offset, feedback, Wet percentage, output channel count, sample rate, duration, and Safety setting.