Rhythmic LFO Wah-Wah — User Guide

A tempo-synchronised resonant wah whose centre frequency follows a sine LFO derived from BPM, musical note value, and straight, dotted, or triplet timing.

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

Rhythmic LFO Wah-Wah moves a resonant filter centre back and forth between a minimum and maximum frequency. The motion is a sine wave, but its speed is expressed musically: the script converts BPM, note value, and rhythmic feel into an exact LFO cycle duration.

The moving resonance is implemented with a one-formant FormantGrid. The grid is built in the Sound's absolute time domain, while the LFO phase is calculated from local time beginning at the start of the Sound. This keeps the modulation pattern unchanged if an otherwise identical Sound is moved to a different start time in Praat.

In practical terms: choose a tempo and rhythmic division, define the frequency range and bandwidth of the resonance, and the filter sweeps through that range once per selected rhythmic cycle.

Tempo & rhythm

Manual BPM or fit a beat count to the whole Sound

The script does not detect tempo from audio content. BPM is obtained in one of two ways:

BPM = 60 × Beats_in_sound / Sound_duration

For example, declaring 8 beats over a 5-second Sound gives 96 BPM. The derived BPM must be greater than 0 and no higher than 1200.

Note values

Note valueBase duration in beats
1/14 beats
1/22 beats
1/41 beat
1/80.5 beat
1/160.25 beat
1/320.125 beat

Straight, dotted, and triplet

The rhythmic feel scales the cycle duration; it does not create a swing pattern or alternate long and short pulses.

FeelDuration multiplierEffect
Straight1Uses the note value unchanged.
Dotted1.5Cycle is 50% longer than the straight value.
Triplet2/3Cycle is 2/3 as long as the straight value.
beat_duration = 60 / BPM cycle_duration = beat_duration × beat_fraction × feel_multiplier LFO_frequency = 1 / cycle_duration

At 120 BPM, for example, a straight quarter-note cycle is 0.5 s = 2 Hz; a dotted quarter is 0.75 s = 1.333... Hz; and a quarter-note triplet is 0.333... s = 3 Hz.

Wah filter

Sine-controlled resonance trajectory

LFO(t) = sin(2π × LFO_frequency × local_time) target_frequency(t) = Min_cutoff + (Max_cutoff − Min_cutoff) × 0.5 × [1 + LFO(t)]

The target therefore moves smoothly from the minimum to the maximum cutoff and back again. At local time 0 the sine is 0, so the first control point begins at the midpoint of the frequency range and initially moves upward.

Adaptive control resolution

The FormantGrid is not limited to a fixed 5 ms update interval. v0.4 chooses:

control_step = min(5 ms, cycle_duration / 32) control_step = max(1 sample, control_step)

This keeps the original 5 ms ceiling for slower modulation while providing at least approximately 32 control positions per LFO cycle at faster rhythmic settings. The grid includes an exact point at the start of the Sound and a final point at its end.

Frequency and bandwidth limits

The requested minimum and maximum centre frequencies are each constrained to the range 20 Hz … 0.45 × sample rate. If the resolved minimum is above the maximum, the two values are swapped. Bandwidth is constrained to 1 Hz … 0.45 × sample rate.

FormantGrid filtering

The Sound and one-formant grid are processed with Praat's Filter (no scale). This avoids the automatic output scaling of the standard Filter command.

Centre-gain calibration

A raw all-pole formant resonator can have a very large gain at its centre frequency. After filtering, v0.4 applies a time-varying gain correction derived from the instantaneous centre frequency and the pole radius:

r = exp(−π × Bandwidth / sample_rate) calibration(t) = (1 − r) × sqrt[ 1 − 2r cos(4π × target_frequency(t) / sample_rate) + r² ]

This is the steady-state centre-frequency gain correction for the resonator at each instantaneous centre setting. It is filter calibration, not peak normalization: it compensates the resonator's raw centre gain before the user-controlled Dry/Wet mix is applied.

Dry/Wet

output = Wet × calibrated_filtered + Dry × original

0% Wet is an exact bypass. The script simply copies the original Sound, creates no FormantGrid control points, and does not apply Safety Peak scaling.

Safety Peak

For active processing, the script measures the output peak after filtering, calibration, and Dry/Wet mixing. If it exceeds Safety Peak, the result is scaled down to that ceiling. A result already below the ceiling is left unchanged.

Safety Peak is attenuation-only. It never boosts quiet material.

Presets

PresetTempoRhythmRangeBandwidth
CustomManual or Beats in SoundUser settingUser settingUser setting
Funky Quarter120 BPM1/4 straight400–2500 Hz150 Hz
Slow Half80 BPM1/2 straight300–2000 Hz150 Hz
Fast Eighth140 BPM1/8 straight500–3000 Hz150 Hz
Triplet Groove100 BPM1/4 triplet400–2200 Hz150 Hz
Dotted Eighth110 BPM1/8 dotted350–2800 Hz150 Hz
Fit 4 Beats to SoundDerived from 4 beats spanning the whole Sound1/4 straight400–2500 Hz150 Hz
Fit 4 Beats to Sound is a duration fit, not tempo detection. It sets Beats_in_sound = 4. With a straight quarter-note LFO, that produces four complete LFO cycles across the duration of the selected Sound.

Preset selection overrides the tempo/rhythm/filter values listed above. Dry/Wet, Safety Peak, visualization, and playback remain under direct user control.

Parameters

ParameterDefaultMeaningRuntime handling
PresetCustomSelects Custom or one of six stored rhythmic/filter settings.Named presets override the relevant values.
Beats in Sound0Positive value = declared number of beats spanning the whole Sound.0 uses Manual BPM; resulting BPM must be ≤1200.
Manual BPM120Tempo used when Beats in Sound = 0.Must produce BPM >0 and ≤1200.
Note value1/4Whole through 32nd note cycle base.Converted to 4, 2, 1, .5, .25, or .125 beats.
FeelStraightScales the selected note duration.Straight ×1; dotted ×1.5; triplet ×2/3.
Min cutoff Hz400Lower centre-frequency limit.Clamped to 20 … .45 × sample rate.
Max cutoff Hz2500Upper centre-frequency limit.Clamped to 20 … .45 × sample rate; swapped with minimum if necessary.
Bandwidth Hz150Formant bandwidth of the moving resonator.Clamped to 1 … .45 × sample rate.
Dry/Wet percent100Blend between original and calibrated filtered signal.Clamped to 0…100%; 0 gives exact bypass.
Safety Peak.99Maximum active-output peak.Clamped to 0…1; 0 disables safety; attenuation only.
Draw visualizationyesCreates the AudioTools picture.Does not alter audio.
Play resultyesPlays the result after processing.Does not alter audio.

Channels & output

PropertyBehavior
Channel countPreserved, including arbitrary multichannel Sounds.
Filter trajectoryThe same FormantGrid trajectory is applied to all channels.
Centre-gain calibrationA mono control Sound is generated on the original sample grid and the same calibration factor is applied to every channel.
Sample ratePreserved.
Duration / sample countPreserved.
Start timePreserved; LFO phase uses local time.
RandomnessNone. The same source and settings give the same result.
0% WetExact copied bypass; control-point generation and Safety Peak are skipped.

The number reported as Control points is the number of time positions used for the FormantGrid trajectory. At each position the script adds both a formant-frequency point and a bandwidth point.

Visualization

When Draw visualization is enabled, v0.4 creates an AudioTools figure with:

Input

Original waveform.

Output

Final processed waveform after filtering, calibration, mix, and any required safety attenuation.

Resonance trajectory

The sine-controlled centre frequency across local source time, with the resolved minimum and maximum frequency range.

Summary

BPM source, note value, feel, LFO frequency, cycle duration, resonance range, bandwidth, Wet amount, safety setting, duration, sample rate, and channel count.

Beat grid

Vertical beat-reference lines are drawn only when the Sound contains at most 80 beats at the resolved BPM. This avoids an unreadably dense picture on long or very fast material.

Trajectory display resolution

The displayed resonance curve uses 400 line positions across the full Sound duration. This is a visualization-only sampling choice. The actual FormantGrid uses the adaptive control resolution described above, which can contain many more points.