Stereo Flanger Effect — User Guide

Jet-like modulation with intense comb filtering: creates sweeping metallic resonances using short modulated delays with regenerative feedback for dramatic time-based effects.

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

What this does

This script implements a stereo flanger effect — recreating the intense, jet-like modulation characteristic of classic analog flangers. The effect works by combining a signal with a slightly delayed, modulated version of itself, creating a series of sharp resonant peaks (comb filtering) that sweep up and down the frequency spectrum. Stereo enhancement creates swirling spatial movement, while regenerative feedback intensifies the metallic, resonant character.

Key Features:

What is flanging? Flanging is an intense modulation effect created by combining a signal with a variably delayed copy of itself. The short delay times (1-10ms) create comb filtering with sharp resonant peaks. The term originated from the 1960s studio technique of playing two tape machines simultaneously and physically pressing the flange (rim) of one tape reel to create varying delay. Modern flangers use electronic or digital delay lines with LFO modulation. Characterized by its dramatic, jet-like "whoosh" sound and metallic resonances.

Technical Implementation: (1) Stereo handling: Automatic mono-to-stereo conversion for width effects. (2) Feedback stage: Creates intense resonances by adding self-modulated delayed signal (positive or negative). (3) Main flanger stage: Combines dry signal with modulated delay using time-varying delay modulation. (4) Stereo phase offset: Left and right channels use different LFO phases. (5) Dry/wet mixing: Blends original and processed signals. Core formula: output = (1-mix)×dry + mix×dry[delay], with optional feedback: signal = original + feedback×signal[delay].

Quick start

  1. In Praat, select exactly one Sound object (mono or stereo).
  2. Run script…stereo_flanger_effect.praat.
  3. Choose a Preset or select "Custom" to adjust parameters manually.
  4. Adjust LFO Settings to control the sweep motion:
    • Rate_hz: Speed of the sweep (0.1-5 Hz)
    • Depth_ms: Intensity of modulation (0.5-5 ms)
    • Base_delay_ms: Center delay time (1-10 ms)
  5. Set Stereo_Phase_Offset_deg (180° = maximum width, 0° = mono).
  6. Adjust Feedback (-0.9 to +0.9) for resonance intensity.
  7. Set Dry_Wet_Mix (0.0-1.0) to blend effect with original.
  8. Click OK — flanger applied, result named "originalname_flanger".
Quick tip: Start with Classic 80s Flanger for traditional sounds. Use Slow Jet for dramatic, resonant sweeps. Try Liquid Metal for fast, hollow effects (negative feedback). Feedback > 0.6 creates intense metallic resonances. Negative feedback produces hollow, phase-inverted effects. Short base delays (1-3ms) create classic flanging, while longer delays (5-10ms) approach chorus-like effects.
Important: High Feedback values (>0.7) can cause extreme resonances and potential instability. Very high Rate_hz values (>3 Hz) create intense fluttering. Extreme settings may cause aliasing or unwanted artifacts. The effect works best on harmonic content — may be overwhelming on dense mixes. Negative feedback creates phase cancellation that can cause volume drops. Output normalization prevents clipping but may reduce overall level.

Flanger Theory

How Flanging Works

The Comb Filtering Principle

Basic flanger operation:

Original signal: dry(t) Delayed signal: wet(t) = dry(t - δ(t)) Where δ(t) = base_delay + modulation × sin(2π × rate × t) Classic flanger with feedback: result(t) = dry(t) + wet(t) + feedback × result(t - δ(t)) Simplified implementation: result(t) = (1-mix) × dry(t) + mix × [dry(t - δ(t)) + feedback × dry(t - δ(t))] This creates a comb filter with sharp resonant peaks

Comb Filter Frequency Response

Resonant peaks occur at regular intervals:

For delay δ, resonant frequencies are: f_peak = n / δ Where n = integer (0,1,2,...) Notch frequencies between peaks: f_notch = (2n+1) / (2δ) As δ changes over time, peaks and notches sweep up/down spectrum With feedback, peaks become sharper and more pronounced
Flanger Frequency Response (Comb Filter)

Amplitude

│ ▲ ▲ ▲ ▲ ← Resonant peaks at n/δ
│ / \ / \ / \ / \
│ / \/ \/ \/ \
│ / ↓ \ ← Notches at (2n+1)/(2δ)
│/ \
└─────────────────────────► Frequency

Feedback Characteristics

Positive vs Negative Feedback

Feedback behavior:

Positive feedback (0 to +0.9): - Emphasizes resonant peaks - Creates metallic, intense sounds - Higher values = sharper resonances - Can cause instability at extreme values Negative feedback (0 to -0.9): - Emphasizes notch frequencies - Creates hollow, phase-cancelled sounds - Higher values = deeper notches - Can cause volume dropouts Zero feedback: - Gentle comb filtering - More subtle modulation - Less metallic character

Feedback Intensity

Feedback values and their effects:

0.0: No feedback - gentle comb filtering
+0.3: Mild resonance - noticeable peak emphasis
+0.6: Medium resonance - pronounced metallic character
+0.8: High resonance - intense, dramatic sweeps
-0.3: Mild hollowing - subtle phase cancellation
-0.6: Medium hollowing - obvious hollow character
-0.8: High hollowing - extreme phase cancellation

Musical use: Positive for metallic effects, negative for hollow sounds

Through-Zero Flanging

Ultra-Short Delay Effects

Through-zero concept:

Traditional flanger: δ(t) > 0 always Through-zero flanger: δ(t) crosses through zero When δ(t) becomes negative: wet(t) = dry(t - δ(t)) with δ(t) < 0 This requires looking ahead in time (not possible in real-time) Creates unique phase inversion effects Simulated approach: Use very short base_delay_ms (≈1ms) Moderate depth so δ(t) approaches zero Creates similar phase cancellation effects

Stereo Enhancement

Phase Offset Between Channels

Stereo flanger formula:

Left channel: δ_L(t) = base_delay + modulation × sin(2π × rate × t + 0) Right channel: δ_R(t) = base_delay + modulation × sin(2π × rate × t + φ) Where φ = stereo_phase_offset (radians) Result: Comb filter peaks sweep at different times in L/R Creates swirling, rotating modulation effect

Phase Offset Values

Stereo_Phase_Offset_deg effects:

0°: Mono flanging - identical in both channels
45°: Gentle stereo motion - subtle width
90°: Clear stereo separation - obvious movement
180°: Maximum width - channels in opposite phase
Custom values: Experiment for unique spatial patterns

Psychoacoustic result: Peaks appear to rotate around listener

Parameter Relationships

Delay Time Ranges

Base_delay_ms (center delay):

Base_delay_ms determines resonant peak spacing: Peak spacing: Δf = 1 / base_delay_ms Typical ranges: 1.0 - 2.0 ms: Tight comb filtering (500-1000 Hz spacing) 2.0 - 4.0 ms: Medium spacing (250-500 Hz) - classic flanger 4.0 - 8.0 ms: Wide spacing (125-250 Hz) - chorus-like 8.0 - 10.0 ms: Very wide spacing (100-125 Hz) - subtle Shorter delays = more peaks in audible range Longer delays = fewer, more widely spaced peaks

Depth_ms (modulation range):

Depth_ms = peak modulation amount Determines sweep range: f_sweep_range ≈ 1/δ_min to 1/δ_max Where: δ_min = base_delay - depth_ms δ_max = base_delay + depth_ms Typical ranges: 0.5 - 1.5 ms: Subtle modulation 1.5 - 3.0 ms: Medium modulation (classic) 3.0 - 5.0 ms: Deep modulation (dramatic) Larger depth = wider frequency sweep

Rate_hz (sweep speed):

Rate_hz = cycles per second Typical ranges: 0.1 - 0.5 Hz: Very slow, evolving sweeps 0.5 - 1.5 Hz: Medium, musical sweeps (common) 1.5 - 3.0 Hz: Fast, obvious sweeps (dramatic) 3.0 - 5.0 Hz: Very fast, intense fluttering Lower rates = smoother, more gradual changes Higher rates = more obvious, rhythmic modulation

Complete Processing Pipeline

SETUP: Select Sound object Choose preset or custom parameters Convert mono to stereo if needed PARAMETER CALCULATION: base_samp = base_delay_ms × fs / 1000 mod_samp = depth_ms × fs / 1000 phase_rad = stereo_Phase_Offset_deg × π / 180 PROCESSING STAGES: STAGE 1: Feedback Approximation IF feedback ≠ 0: For each channel: signal = original + feedback × delayed_signal where delayed_signal = signal[t - (base_samp + mod_samp×sin(ωt+φ))] STAGE 2: Main Flanger Mix For left channel (row 1): output = (1-mix) × dry + mix × dry[t - (base_samp + mod_samp×sin(ωt))] For right channel (row 2): output = (1-mix) × dry + mix × dry[t - (base_samp + mod_samp×sin(ωt+phase_rad))] FINALIZATION: Normalize peak to scale_peak Optional: Play result Display processing summary OUTPUT: "originalname_flanger" with stereo flanger effect

Effect Presets

Classic 80s Flanger

🎸 Vintage Flanger Tone

Settings: Rate: 0.5 Hz, Depth: 1.5 ms, Base: 2.0 ms, Phase: 90°, Feedback: 0.6, Mix: 0.5

Character: Classic analog flanger sound with moderate resonance

Best for: Electric guitar, synths, 80s-style vocals

Slow Jet (High Feedback)

✈️ Dramatic Resonant Sweeps

Settings: Rate: 0.15 Hz, Depth: 2.5 ms, Base: 3.0 ms, Phase: 180°, Feedback: 0.85, Mix: 0.5

Character: Intense, metallic sweeps with high resonance

Best for: Sound effects, dramatic transitions, lead instruments

Liquid Metal (Fast)

💧 Hollow, Phase-Inverted

Settings: Rate: 3.0 Hz, Depth: 0.5 ms, Base: 1.0 ms, Phase: 180°, Feedback: -0.7, Mix: 0.6

Character: Fast, hollow modulation with negative feedback

Best for: Special effects, experimental sounds, percussion

Deep Throat (Long Delay)

🎵 Chorus-Like Modulation

Settings: Rate: 0.4 Hz, Depth: 4.0 ms, Base: 8.0 ms, Phase: 45°, Feedback: 0.5, Mix: 0.5

Character: Gentle, chorus-like modulation with wide peaks

Best for: Pads, vocals, subtle movement

Through-Zero (Simulated)

🌀 Ultra-Short Delay Effects

Settings: Rate: 0.2 Hz, Depth: 0.9 ms, Base: 1.0 ms, Phase: 180°, Feedback: 0.4, Mix: 0.7

Character: Unique phase cancellation from near-zero delays

Best for: Experimental sounds, special effects

Subtle Stereo Widener

🔊 Gentle Spatial Enhancement

Settings: Rate: 0.1 Hz, Depth: 1.0 ms, Base: 5.0 ms, Phase: 180°, Feedback: 0.1, Mix: 0.4

Character: Very subtle flanging primarily for stereo width

Best for: Adding space to mono sources, background elements

PresetRate (Hz)Depth (ms)Base (ms)Phase (°)FeedbackMixUse Case
Classic 80s0.51.52.0900.60.5Vintage instruments
Slow Jet0.152.53.01800.850.5Dramatic effects
Liquid Metal3.00.51.0180-0.70.6Hollow effects
Deep Throat0.44.08.0450.50.5Chorus-like
Through-Zero0.20.91.01800.40.7Experimental
Stereo Widener0.11.05.01800.10.4Subtle enhancement

Parameters

LFO Settings

ParameterTypeRangeDefaultDescription
Rate_hzpositive0.1-5.00.3Sweep speed in cycles per second
Depth_mspositive0.5-5.02.0Modulation intensity in milliseconds
Base_delay_mspositive1.0-10.03.0Center delay time in milliseconds

Stereo Image

ParameterTypeRangeDefaultDescription
Stereo_Phase_Offset_degpositive0-360180Phase difference between channels in degrees

Mix & Feedback

ParameterTypeRangeDefaultDescription
Feedbackreal-0.9 to +0.90.7Resonance intensity (negative = hollow)
Dry_Wet_Mixpositive0.0-1.00.5Blend between dry and wet signals

Output

ParameterTypeRangeDefaultDescription
Scale_peakpositive0.1-1.00.99Output normalization level
Play_after_processingbooleanyes/noyesAuto-play processed sound

Applications

Guitar Effects

Use case: Classic flanger tones for electric guitar

Technique: Use "Classic 80s Flanger" with medium settings

Tips:

Drum Processing

Use case: Adding movement to drums and percussion

Technique: Use fast settings with careful mixing

Settings:

Result: Adds swirling movement to drum textures

Synth and Sound Design

Use case: Creating metallic, resonant synth textures

Technique: Use high feedback and dramatic settings

Settings:

Vocal Effects

Use case: Adding character and movement to vocals

Technique: Use subtle settings with "Deep Throat" preset

Key principles:

Result: Vocals gain movement and space without obvious effect

Special Effects Creation

Use case: Sci-fi, mechanical, and extreme sounds

Technique: Use extreme settings from "Slow Jet" or "Liquid Metal"

Creative approaches:

Practical Workflow Examples

🎸 Guitar Flanger

Goal: Classic flanger on clean guitar

Settings:

  • Preset: Classic 80s Flanger
  • Adjust rate to match song tempo
  • Mix: 0.4-0.6
  • Feedback: 0.5-0.7
  • Stereo phase: 90-180°

Result: Classic swirling guitar tone

🥁 Drum Movement

Goal: Add motion to drum overheads

Settings:

  • Rate: 0.8 Hz
  • Depth: 1.2 ms
  • Base: 4.0 ms
  • Feedback: 0.3
  • Mix: 0.25
  • Stereo phase: 180°

Result: Subtle swirling movement on drums

👽 Sci-Fi Effect

Goal: Create futuristic sound effect

Settings:

  • Preset: Liquid Metal
  • Rate: 2.5 Hz
  • Feedback: -0.8
  • Mix: 0.8
  • Apply to synth sweep or noise burst

Result: Hollow, metallic sci-fi effect

Advanced Techniques

LFO rate musical timing:

Set rate to match song tempo for rhythmic flanging:

Rate_hz = BPM / 60 (one sweep per beat) Rate_hz = BPM / 120 (one sweep every two beats) Rate_hz = BPM / 240 (one sweep every four beats) Example: 120 BPM song Rate = 2.0 Hz → one sweep per beat Rate = 1.0 Hz → one sweep every two beats Rate = 0.5 Hz → one sweep every four beats
Feedback extremes:
  • Positive feedback > 0.8: Intense metallic resonances, potential instability
  • Negative feedback < -0.8: Extreme phase cancellation, volume drops
  • Feedback = 0: Pure comb filtering without resonance emphasis
  • Alternating positive/negative: Creates complex, evolving textures

Troubleshooting Common Issues

Problem: Extreme resonances or ringing
Cause: Feedback too high, especially with certain source material
Solution: Reduce feedback, try different base delay times
Problem: Volume drops or hollow spots
Cause: Negative feedback causing phase cancellation
Solution: Reduce negative feedback, adjust base delay
Problem: Unwanted fluttering or artifacts
Cause: Rate too high, depth too extreme
Solution: Lower rate, reduce depth, try different source material
Problem: Effect too subtle
Cause: Mix too low, inappropriate settings for source
Solution: Increase mix, try more extreme settings, use on harmonic content

Technical Deep Dive

Digital Implementation

Modulated Delay Line

The core flanger algorithm uses a modulated delay line with feedback:

For each sample n, channel c: delay_samples[n] = base_samp + mod_samp × sin(2π × rate_hz × n/fs + φ_c) Where: base_samp = base_delay_ms × fs / 1000 mod_samp = depth_ms × fs / 1000 φ_c = 0 for left channel, phase_rad for right channel fs = sampling frequency The feedback-enhanced signal: wet[n] = dry[n - round(delay_samples[n])] + feedback × wet[n - round(delay_samples[n])] Final output: result[n] = (1-mix) × dry[n] + mix × wet[n]

Frequency Response Analysis

The flanger creates a comb filter with resonant peaks:

The frequency response of a flanger with feedback is: H(f) = (1 - mix) + mix × [exp(-j2πfδ) / (1 - feedback × exp(-j2πfδ))] Magnitude response shows peaks where: |1 - feedback × exp(-j2πfδ)| is minimum Peak frequencies: f_peak = n / δ (same as without feedback) Peak sharpness controlled by feedback: Higher |feedback| = sharper peaks feedback > 0 = peak emphasis feedback < 0 = notch emphasis

Comparison with Other Modulation Effects

Flanger vs Phaser vs Chorus

EffectDelay RangeFilter TypeCharacterKey Parameter
Flanger1-10 msComb filterMetallic, jet-likeFeedback
PhaserN/A (all-pass)Notch filterSweeping, whooshingStage count
Chorus10-30 msPitch detuneThickening, ensembleDelay time

Historical Context

Analog flanger history: The flanger effect originated in the 1960s with the tape-based technique of using two synchronized tape machines and physically pressing the flange of one reel to vary delay. The first electronic flangers appeared in the 1970s, with the ADA Flanger (1977) and MXR Flanger (1979) becoming iconic. Analog flangers used bucket-brigade device (BBD) delay chips with LFO modulation. Digital implementations recreate the effect using modulated digital delay lines with feedback, offering more precise control and stability than analog circuits.