Stereo Swirl Vibrato — User Guide

Phase-offset fractional-delay vibrato for stereo and multichannel Sounds. Odd and even channels follow different sinusoidal delay trajectories, creating complementary pitch motion and a wide stereo modulation pattern.

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 Swirl Vibrato creates vibrato by reading the source through a continuously moving fractional delay. Two versions of the same sinusoidal delay trajectory are used: one for odd-numbered channels and one for even-numbered channels. The second trajectory is shifted by Phase Offset, so the channel groups do not reach the same pitch position at the same moment.

The resulting stereo motion comes from complementary pitch/time modulation. There is no level panning stage: the perceived width is produced by the different vibrato phases carried by the channel groups.

At 100% Wet, the active part of the result is the moving-delay signal alone. At intermediate values, the delayed signal is mixed with the original, producing a chorus-like dry+vibrato combination. Mono input is duplicated to stereo only when active processing is required.

Processing model

1. Resolve preset and safety limits

The selected preset replaces the delay, depth, rate, phase, and Dry/Wet settings. Parameters are then constrained to safe runtime ranges. The phase value is wrapped into one 0–360° cycle.

2. Convert depth into a delay excursion

Base delay = B seconds Depth ratio = d = Delay_depth_percent / 100 Delay excursion = E = B × d Delay range = B − E ... B + E

Delay Depth is therefore relative to the Base Delay. A depth of 20% with an 8 ms base delay means an excursion of ±1.6 ms, not a fixed pitch deviation of 20 cents or 20%.

3. Generate two phase-related delay trajectories

local time: τ = t − Sound_start odd channels: Dodd(τ) = B + E × sin(2πfτ) even channels: Deven(τ) = B + E × sin(2πfτ + φ)

f is Modulation Rate and φ is Phase Offset. The same trajectory is reused within each channel group.

4. Read the source with continuous interpolation

wet_c(t) = source_c(t − D_c(t))

Praat's time-based Sound lookup supplies continuous interpolation, so the moving delay is not rounded to integer samples.

5. Fill the delay line smoothly

During the first maximum-delay interval, the wet contribution is ramped in linearly:

ramp(t) = clamp(local_time / maximum_delay, 0, 1) output = source × (1 − Wet × ramp) + delayed_source × Wet × ramp

After the ramp reaches 1, this becomes the normal dry/wet mixture.

6. Apply output safety only when needed

After active processing, the script measures the output peak. If Safety Peak is enabled and the peak exceeds that ceiling, the complete Sound is attenuated to the requested value. Material already below the ceiling keeps its level.

Safety Peak is attenuation-only. It does not normalize quiet output upward.

Delay and pitch motion

A changing delay changes the rate at which the source timeline is traversed. For the sinusoidal delay used here, the approximate instantaneous playback ratio is:

q(t) = 1 − dD(t)/dt = 1 − 2πfE × cos(phase)

The approximate instantaneous pitch shift shown by the script is therefore:

pitch_cents(t) = 1200 × log2(q(t))

This explains why pitch depth depends jointly on Base Delay, Delay Depth, and Modulation Rate. Raising any of these can increase the derivative of the delay trajectory and therefore increase the vibrato excursion.

Derivative-safe depth clamp

v0.4 limits the maximum absolute delay derivative:

|dD/dt| = 2π × rate × base_delay × depth_ratio ≤ 0.45

If the requested settings exceed this limit, Delay Depth is reduced automatically. This keeps the instantaneous playback ratio positive and avoids extreme time warping.

Minimum causal delay

When modulation is active, the minimum delay is kept at least one sample long. If the requested Base Delay is too small for the selected depth, the effective Base Delay is raised just enough to satisfy that condition.

The Info window reports both the resolved delay excursion and the approximate positive/negative vibrato peaks in cents.

Channel phase structure

Phase OffsetRelationship between odd and even channels
0°Locked trajectories: both channel groups receive the same vibrato phase.
45°Small temporal offset between the two trajectories.
90°Quadrature: one trajectory is one quarter-cycle from the other.
180°Counter-sweep: when one trajectory moves toward its maximum delay, the other moves toward its minimum.
270°Reverse quadrature relative to 90°.
360°Equivalent to 0° after phase wrapping.
Channel assignment: channels 1, 3, 5… use the odd-channel trajectory; channels 2, 4, 6… use the phase-offset trajectory. No audio is cross-fed between channels.

Presets

Preset Base Depth Rate Phase Dry/Wet
Custom6.0 ms12%4.5 Hz90°100%
Gentle Stereo Chorus5.0 ms10%5.0 Hz90°45%
Wide Stereo Swirl6.0 ms15%4.5 Hz180°100%
Slow Circular Swirl8.0 ms18%1.5 Hz90°100%
Psychedelic Spiral7.0 ms20%6.0 Hz270°100%
Subtle Width4.0 ms8%4.0 Hz45°35%
Extreme Dizzy10.0 ms25%8.0 Hz180°100%

Parameters

ParameterDefaultMeaningRuntime handling
Base delay ms6.0Center delay around which the vibrato trajectory moves.Clamped to 0…50 ms; may be raised to preserve a one-sample minimum delay.
Delay depth percent12Delay excursion as a percentage of Base Delay.Clamped to 0…95%; may be reduced further by the derivative-safety rule.
Modulation rate Hz4.5Vibrato-cycle rate.Clamped to 0…20 Hz.
Phase offset degrees90Phase displacement between odd- and even-channel delay trajectories.Wrapped into 0…360°.
Dry/Wet percent100Blend between original and moving-delay source.Clamped to 0…100%.
Safety peak0.99Maximum allowed peak after active processing.Clamped to 0…1; 0 disables safety; attenuation only.
Draw visualizationyesDraws the AudioTools figure.Does not affect audio.
Play resultyesPlays the completed Sound.Does not affect audio.

Channels & output

PropertyBehavior
Mono inputIf the effect is active, the mono source is duplicated to stereo before the two phase trajectories are applied. On exact bypass, it remains mono.
Stereo inputTwo channels remain stereo; channel 1 uses the odd trajectory and channel 2 the phase-offset trajectory.
More than 2 channelsChannel count is preserved; odd/even channel groups use the two trajectories alternately.
Cross-channel processingNone. Every output channel reads only from the corresponding source channel.
Sample ratePreserved.
Duration / sample countPreserved.
Start timePreserved; LFO phase uses local time from that start.
RandomnessNone. The same source and settings produce the same trajectories and output.

Exact bypass

The result is a direct copy of the source when any of the following is true:

On this bypass path, no stereo conversion and no Safety Peak gain change are applied.

Visualization

When Draw visualization is enabled, v0.4 draws:

Input

Original waveform.

Output

Final processed waveform after any required Safety Peak attenuation.

Delay trajectory

Odd- and even-channel delay paths in milliseconds over the first up to 2 seconds.

Pitch trajectory

Approximate instantaneous pitch motion in cents for the two channel groups, derived from the delay derivative.

Both trajectory panels use 300 drawing points. They visualize the same mathematical control trajectories used by the DSP; the audio itself is evaluated continuously through Praat's Sound interpolation.

Summary strip

The summary reports resolved Base Delay, effective Delay Depth, Rate, Phase Offset, Dry/Wet, output channel count, duration, and Safety state.