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.
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_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
- 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.
- Choose output channel geometry. Mono input becomes stereo; input with two or more channels preserves its channel count.
- 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.
- Analyze overlapping frames. The window is approximately 40 ms and the hop is one quarter of the window, giving 75% overlap.
- 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. - 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.
- Mix dry and wet. The reconstructed wah signal is blended with the original according to
Wet_dry_percent. - Apply output safety. If enabled, the final signal is attenuated only when its peak exceeds
Safety_peak.
Quick start
- Select exactly one Sound object in Praat.
- Run
Wah-Wah_Effect.praat. - Choose a preset, or select Custom.
- Choose Sine LFO for periodic wah movement or Envelope Follower for source-responsive movement.
- Set the frequency range, bandwidth, resonance peak, wet/dry amount, and—when using the LFO—stereo offset.
- Run the script. The result is created as
<source>_wahwah.
Modulation modes
Sine LFO
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.
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:
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.
Presets
| Preset | Mode | Rate / envelope | Range | Bandwidth | Resonance | Stereo offset |
|---|---|---|---|---|---|---|
| Classic Wah (slow) | Sine LFO | 0.8 Hz | 400–1800 Hz | 350 Hz | 2.5× | 0.10 cycles |
| Funky Wah (fast) | Sine LFO | 3.5 Hz | 350–2500 Hz | 300 Hz | 3.0× | 0.15 cycles |
| Auto-Wah (envelope follower) | Envelope Follower | 8 ms attack / 90 ms release / 30 dB range | 250–2200 Hz | 400 Hz | 2.0× | 0 |
| Crying Wah | Sine LFO | 1.2 Hz | 500–2800 Hz | 250 Hz | 4.0× | 0.08 cycles |
| Talk-Box-like Sweep | Sine LFO | 0.6 Hz | 300–3500 Hz | 500 Hz | 1.8× | 0.20 cycles |
| Subtle Sweep | Sine LFO | 0.4 Hz | 500–1500 Hz | 600 Hz | 1.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
| Parameter | Default | Meaning |
|---|---|---|
| Preset | Custom | Applies one of the six predefined wah strategies, or leaves all controls manual. |
| Modulation_mode | Sine LFO | Periodic center-frequency motion or source-envelope-controlled motion. |
| Wah_rate_Hz | 1.5 | LFO rate in cycles per second. Used only in Sine LFO mode. |
| Envelope_attack_ms | 12 | Follower rise time. Shorter values react faster to increases in level. |
| Envelope_release_ms | 100 | Follower fall time. Longer values keep the wah open longer after peaks. |
| Envelope_range_dB | 30 | Level range below the file maximum that maps to the 0–1 envelope control. |
| Min_frequency_Hz | 300 | Lowest wah-center frequency after validation. |
| Max_frequency_Hz | 2000 | Highest wah-center frequency after validation and Nyquist protection. |
| Bandwidth_Hz | 400 | Nominal flat pass-band width around the moving center, before edge transitions. |
| Resonance_peak | 2.0 | Linear center-frequency peak multiplier; internally limited to 1–12. |
| Stereo_offset_cycles | 0.10 | LFO phase spread from first to last output channel; internally limited to 0–0.5 cycles. Ignored in Envelope Follower mode. |
| Wet_dry_percent | 75 | 0 = dry path only; 100 = wah path only. |
| Safety_peak | 0.99 | Attenuation-only final peak ceiling. Values ≤0 disable it. |
| Draw_response | On | Draw the AudioTools diagnostic visualization. |
| Play_result | On | Play the final Sound after processing. |
Input & output behavior
| Property | Behavior |
|---|---|
| Required selection | Exactly one Sound object. |
| Mono input | Produces 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 input | Preserves the original channel count. Each channel is filtered independently from its own samples. |
| Analysis channel | Envelope Follower uses a mono analysis copy only; it does not collapse the rendered multichannel source. |
| Duration | Preserved. |
| Sampling frequency | Preserved. |
| Start time | Preserved, including non-zero xmin. |
| Wet = 0 | Exact dry bypass for 2+ channel input. Mono is duplicated to stereo by design. |
| Output level | No normalization or automatic boost. Safety attenuation occurs only if the final peak exceeds the enabled ceiling. |
| Output name | <source>_wahwah. |
| Randomness | None; processing is deterministic for the same source and settings. |
Visualization
When Draw_response is enabled, v0.5 draws the AudioTools suite-standard page with:
- input waveform;
- output waveform;
- the center-frequency trajectory over time;
- for Sine LFO, the first-channel and last-channel trajectories so the stereo phase offset is visible;
- for Envelope Follower, the common envelope-derived trajectory;
- a representative midpoint spectral response showing pass-band shape and resonance peak;
- a summary strip with range, bandwidth, resonance, wet percentage, modulation mode, channel behavior, STFT geometry, and final peak.
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
- Spectral wah, not circuit emulation. The response is constructed directly in each frame spectrum; it does not model a specific analog wah pedal, inductor, transistor ladder, or pedal potentiometer.
- Finite STFT resolution. The 40 ms analysis window determines the frequency-bin spacing. Very narrow requested bandwidths are therefore limited by the frame resolution.
- Time-varying spectral filtering. The response changes once per STFT frame and is reconstructed through overlap-add. It is smooth, but not a sample-by-sample analog filter coefficient update.
- Frequency bounds are protected. The script swaps reversed min/max values and limits the upper center range below Nyquist. Bandwidth and resonance are also constrained to safe internal ranges.
- Safety is a ceiling, not loudness matching. A quieter result remains quieter; the processor never raises gain merely to reach
Safety_peak.