Stereo Phaser — User Guide

A true variable all-pass phaser: two or four first-order all-pass stages are swept across a logarithmic frequency range, then mixed with the direct signal to create moving spectral notches. Stereo phase offset and feedback extend the motion and resonance.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.4 (2026) License: MIT License Repo: https://github.com/ShaiCohen-ops/Praat-plugin_AudioTools
Contents:

What this does

Stereo Phaser processes the selected Sound through a time-varying cascade of first-order all-pass sections. The all-pass path keeps its magnitude flat when feedback is zero but rotates phase as a function of frequency. Mixing that phase-shifted path with the direct signal creates cancellations at selected frequencies. As the all-pass pivot frequency moves, those cancellations sweep through the spectrum.

The sweep follows a sinusoidal LFO mapped logarithmically between Sweep min Hz and Sweep max Hz. The left and right trajectories can be offset in LFO phase, and a positive feedback loop around the complete all-pass cascade increases resonant emphasis.

Architecture: this is an all-pass phaser, not the variable-delay comb topology used by older versions of this script. Sweep controls are all-pass pivot frequencies in Hz rather than delay times in milliseconds.

Processing pipeline

1. Apply the selected preset or Custom values.
2. Clamp rate, sweep frequencies, feedback, Wet percentage, and Safety Peak to safe ranges.
3. If processing is active and the input is mono, convert it to stereo; existing multichannel layouts remain multichannel.
4. Generate a per-sample all-pass coefficient trajectory from the logarithmic L/R pivot sweeps.
5. Evaluate a 2- or 4-stage all-pass cascade with a true recursive feedback loop around the cascade.
6. Mix the independent source and wet objects using the requested Dry/Wet percentage.
7. Apply attenuation-only Safety Peak scaling only if the active result exceeds the ceiling.
8. Optionally draw the AudioTools visualization and play the result.

0% Wet takes an exact bypass path before mono-to-stereo conversion and before Safety Peak scaling.

All-pass cascade

Pivot-frequency coefficient

For each sample, the LFO first produces a pivot frequency f. The script maps that frequency to the first-order all-pass coefficient:

g = tan(pi × f / sample_rate) a = (g - 1) / (g + 1) H1(z) = (a + z^-1) / (1 + a z^-1)

The selected stage configuration cascades the same section two or four times:

H(z) = H1(z)^N N = 2 or 4

With feedback set to zero, the cascade is strictly all-pass in magnitude: it changes phase rather than spectral amplitude. The moving notches appear only when this wet path is combined with the direct signal.

True loop feedback

Feedback is wrapped around the complete all-pass cascade:

Y = H × (X + feedback × Y) therefore: Y / X = H / (1 - feedback × H)

The script expands the 2- or 4-stage cascade algebraically and evaluates the resulting recursive direct-form equation sample by sample. Feedback Resonance is restricted to 0…0.90.

Dry/Wet summation

output = Dry × source + Wet × feedback_allpass_output Dry = 1 - Wet

At feedback = 0, equal dry/wet mixing gives the familiar moving cancellation pattern of an all-pass phaser. Changing the Wet ratio changes notch depth; feedback changes the wet-path magnitude and resonance around the phase sweep.

Stereo modulation

Logarithmic pivot sweep

The normalized LFO is mapped exponentially between the two sweep limits:

u(t) = 0.5 × [1 + sin(2pi × Rate × local_time + phase)] pivot(t) = Sweep_min × exp[ ln(Sweep_max / Sweep_min) × u(t) ]

This makes the pivot travel by frequency ratio rather than by equal-Hz steps.

Channel phase routing

Odd-numbered channels use the L trajectory with phase 0. Even-numbered channels use the R trajectory with Stereo phase offset added to the LFO phase.

OffsetTrajectory relationship
L and R follow the same sweep.
90°R is one quarter LFO cycle ahead of L.
180°Counter-sweep: one side is high in the sweep while the other is low.

The LFO uses local Sound time (x - sourceStart), so moving an otherwise identical Sound to a different Praat start time does not change its modulation trajectory.

Presets

PresetRateSweepStagesStereoFeedbackWet
Customform valueform valuesform valueform valueform valueform value
Classic 70s Phaser0.60 Hz280–1800 Hz490°0.2550%
Slow & Deep0.20 Hz120–2600 Hz4180°0.3555%
Jet Plane (High Resonance)0.15 Hz220–3200 Hz40.7850%
Fast Wobble4.00 Hz450–3600 Hz2180°0.2045%
Wide Stereo Widener0.10 Hz650–2200 Hz2180°0.0035%
Sci-Fi Raygun2.50 Hz180–5000 Hz4180°0.7250%
Preset sweep maxima are still subject to the sample-rate-dependent Nyquist safety clamp.

Parameters

ParameterDefaultMeaningRuntime handling
Rate Hz0.5LFO sweep rate.Negative values become 0.
Sweep min Hz300Lower all-pass pivot frequency.Minimum 20 Hz; repaired if too close to the allowed maximum.
Sweep max Hz2200Upper all-pass pivot frequency.Maximum 0.45 × sample rate; forced above Sweep min.
Stage configuration4 stagesNumber of identical first-order all-pass sections in the cascade.2 or 4 stages.
Stereo phase offset deg180LFO phase difference between odd and even channels.Used directly in radians; periodic values outside 0…360 remain mathematically valid.
Feedback resonance0.35Positive loop gain around the full all-pass cascade.Clamped to 0…0.90.
Dry/Wet percent50Blend between independent dry and wet paths.Clamped to 0…100%; 0 gives exact bypass.
Safety peak0.99Maximum processed-output peak.Clamped to 0…1; 0 disables safety; attenuation only.
Draw visualizationyesDraws the AudioTools picture.Does not change audio.
Play resultyesPlays the completed Sound.Does not change audio.

Channels & output

PropertyBehavior
Mono input, active effectConverted to stereo before phasing so L/R trajectories can differ.
Mono input, 0% WetExact mono copy; no stereo conversion occurs.
2+ channel inputOriginal channel count is preserved. Odd channels use L modulation; even channels use R modulation.
Cross-channel processingNone. Each channel has its own recursive all-pass/feedback state.
Sample ratePreserved.
Sample count / durationPreserved.
Start timePreserved; modulation phase is start-time invariant because it uses local time.
RandomnessNone.
SafetyIf the active result exceeds Safety Peak, the whole output is scaled down. Quiet outputs are never boosted.

Visualization

When Draw visualization is enabled, v0.4 creates the AudioTools house layout:

Input

Original waveform.

Output

Final processed waveform after optional Safety Peak attenuation.

All-pass pivot sweep

L and R logarithmic pivot trajectories over the first up to 3 seconds. Purple = L; blue = R.

Analytical response

Static magnitude response at the geometric-mid pivot sqrt(Sweep_min × Sweep_max), including the selected stage count, feedback, and Dry/Wet values.

The analytical response is calculated from the actual all-pass/feedback transfer function. It is not a delay-comb approximation.

Summary strip

The bottom strip reports stage count, sweep range, LFO rate, stereo phase offset, feedback, Wet percentage, final peak, and original input channel count.