Wah-Wah Effect — User Guide

Continuous STFT spectral wah with sine-LFO or source-envelope control, multichannel phase offsets, resonant spectral emphasis, dry/wet mixing, and attenuation-only output safety.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.5 (2026) License: MIT License Repo: Praat AudioTools
Contents:

What this does

Wah-Wah Effect creates a moving spectral emphasis by passing each short-time frame through a frequency-domain wah response whose center frequency changes over time. The center can follow a periodic sine LFO or the source amplitude envelope. A broad Hann-like pass band defines the audible region around the moving center, while a Gaussian peak adds controllable resonance at the center frequency.

The processor runs continuously in a short-time Fourier transform (STFT) overlap-add engine rather than cutting the source into hard segments. Analysis and synthesis both use a square-root Hann window, and overlapping frames are divided by an accumulated weight buffer during reconstruction. This produces a smoothly changing filter trajectory while preserving the original duration and sample timing.

Resonance in this tool: Resonance_peak is a spectral gain multiplier centered on the current wah frequency. A value of 1 adds no extra center peak; larger values increase the spectral emphasis. It is not an analog wah-pedal Q parameter or a transistor-level pedal model.

Processing pipeline

  1. Prepare the source. The selected Sound is copied and shifted internally to start at 0 for processing. Its original start time is restored at the end.
  2. Choose output channel geometry. Mono input becomes stereo; input with two or more channels preserves its channel count.
  3. Build the modulation trajectory. Sine LFO computes a periodic center-frequency path. Envelope Follower measures frame RMS, converts it to a 0–1 control relative to the file maximum, and smooths it with separate attack and release constants.
  4. Analyze overlapping frames. The window is approximately 40 ms and the hop is one quarter of the window, giving 75% overlap.
  5. Apply the spectral wah. Each frame is transformed with To Spectrum: "no", multiplied by the moving Hann-like pass response and center resonance peak, and converted back to Sound.
  6. Overlap-add reconstruction. A square-root Hann synthesis window is applied and frames are summed at their original sample positions. The accumulated Hann weight is then divided out.
  7. Mix dry and wet. The reconstructed wah signal is blended with the original according to Wet_dry_percent.
  8. Apply output safety. If enabled, the final signal is attenuated only when its peak exceeds Safety_peak.

Quick start

  1. Select exactly one Sound object in Praat.
  2. Run Wah-Wah_Effect.praat.
  3. Choose a preset, or select Custom.
  4. Choose Sine LFO for periodic wah movement or Envelope Follower for source-responsive movement.
  5. Set the frequency range, bandwidth, resonance peak, wet/dry amount, and—when using the LFO—stereo offset.
  6. Run the script. The result is created as <source>_wahwah.

Modulation modes

Sine LFO

wahPos(t) = 0.5 + 0.5 · sin(2π · (rate · t + phaseOffset)) centerFreq(t) = Min_frequency + wahPos(t) · (Max_frequency - Min_frequency)

Wah_rate_Hz is the actual LFO rate in cycles per second. For multichannel signals, the phase offset is distributed evenly from 0 cycles on the first channel to Stereo_offset_cycles on the last channel. For mono input, the generated stereo output therefore receives two phase-related wah trajectories.

Envelope Follower

For every STFT frame, the script measures RMS from a mono analysis copy. The RMS values are expressed in dB relative to the loudest frame in the file. Envelope_range_dB defines the level span mapped into the 0–1 control range; values below that span clamp to 0 and the loudest frame maps to 1.

The raw control is smoothed with independent attack and release time constants. That smoothed value then maps linearly between Min_frequency_Hz and Max_frequency_Hz. All output channels use the same envelope-derived center trajectory; the original channel signals themselves remain independent.

Envelope Follower is relative to the current file. It follows level changes within the selected Sound; it is not a calibrated absolute loudness detector.

Wah response

At each frame, the pass region extends approximately half the selected bandwidth below and above the current center frequency, clipped to 0 Hz and Nyquist when necessary. Each outer edge receives a cosine transition whose width is:

transition = max(STFT bin width, 0.25 · Bandwidth) resonance width = max(STFT bin width, 0.18 · Bandwidth)

Inside that pass response, a Gaussian peak is centered at the current wah frequency. The linear gain at the exact center is therefore approximately Resonance_peak, while a value of 1 leaves the pass-band center flat.

Bandwidth describes the nominal flat central pass region before the cosine edge transitions. It is not a Q value and it is not a −3 dB bandwidth specification.

Presets

PresetModeRate / envelopeRangeBandwidthResonanceStereo offset
Classic Wah (slow)Sine LFO0.8 Hz400–1800 Hz350 Hz2.5×0.10 cycles
Funky Wah (fast)Sine LFO3.5 Hz350–2500 Hz300 Hz3.0×0.15 cycles
Auto-Wah (envelope follower)Envelope Follower8 ms attack / 90 ms release / 30 dB range250–2200 Hz400 Hz2.0×0
Crying WahSine LFO1.2 Hz500–2800 Hz250 Hz4.0×0.08 cycles
Talk-Box-like SweepSine LFO0.6 Hz300–3500 Hz500 Hz1.8×0.20 cycles
Subtle SweepSine LFO0.4 Hz500–1500 Hz600 Hz1.5×0.05 cycles

Presets override the modulation and wah parameters shown above. Wet_dry_percent, Safety_peak, Draw_response, and Play_result remain user-controlled. LFO presets do not need the envelope attack/release/range fields because those values are ignored in LFO mode.

Parameters

ParameterDefaultMeaning
PresetCustomApplies one of the six predefined wah strategies, or leaves all controls manual.
Modulation_modeSine LFOPeriodic center-frequency motion or source-envelope-controlled motion.
Wah_rate_Hz1.5LFO rate in cycles per second. Used only in Sine LFO mode.
Envelope_attack_ms12Follower rise time. Shorter values react faster to increases in level.
Envelope_release_ms100Follower fall time. Longer values keep the wah open longer after peaks.
Envelope_range_dB30Level range below the file maximum that maps to the 0–1 envelope control.
Min_frequency_Hz300Lowest wah-center frequency after validation.
Max_frequency_Hz2000Highest wah-center frequency after validation and Nyquist protection.
Bandwidth_Hz400Nominal flat pass-band width around the moving center, before edge transitions.
Resonance_peak2.0Linear center-frequency peak multiplier; internally limited to 1–12.
Stereo_offset_cycles0.10LFO phase spread from first to last output channel; internally limited to 0–0.5 cycles. Ignored in Envelope Follower mode.
Wet_dry_percent750 = dry path only; 100 = wah path only.
Safety_peak0.99Attenuation-only final peak ceiling. Values ≤0 disable it.
Draw_responseOnDraw the AudioTools diagnostic visualization.
Play_resultOnPlay the final Sound after processing.

Input & output behavior

PropertyBehavior
Required selectionExactly one Sound object.
Mono inputProduces stereo output. In LFO mode the two channels can receive different LFO phases; in Envelope Follower mode both channels share the same trajectory.
2+ channel inputPreserves the original channel count. Each channel is filtered independently from its own samples.
Analysis channelEnvelope Follower uses a mono analysis copy only; it does not collapse the rendered multichannel source.
DurationPreserved.
Sampling frequencyPreserved.
Start timePreserved, including non-zero xmin.
Wet = 0Exact dry bypass for 2+ channel input. Mono is duplicated to stereo by design.
Output levelNo normalization or automatic boost. Safety attenuation occurs only if the final peak exceeds the enabled ceiling.
Output name<source>_wahwah.
RandomnessNone; processing is deterministic for the same source and settings.

Visualization

When Draw_response is enabled, v0.5 draws the AudioTools suite-standard page with:

The visualization uses temporary mono copies only for drawing waveforms. It does not modify the rendered output. In testing, Draw ON and Draw OFF produced sample-identical audio.

Notes & limitations