Dynamic Formant Sweeper — User Guide

LFO-controlled spectral-envelope motion around a robust F1 landmark, using short-time spectral shaping rather than LPC resynthesis.

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

What this does

Dynamic Formant Sweeper creates a moving resonance-like spectral emphasis controlled by an LFO. It first measures a robust F1 landmark from the selected sound using Praat's FormantPath analysis. That landmark is used only as a reference region: the script does not resynthesize the sound with LPC, does not inverse-filter an excitation signal, and does not use a FormantGrid.

Instead, the sound is processed in short overlapping spectral grains. For each grain, the script reduces energy around the measured F1 region and adds a broad spectral-envelope peak at the current LFO target frequency. The same real-valued gain is applied to the real and imaginary parts of every spectral bin, so the original phase is preserved bin by bin.

Interpret the LFO target as a spectral-envelope target, not as a newly synthesized vocal-tract formant. FormantPath supplies one robust landmark — the median F1 and its spread — while the audible motion is produced by STFT magnitude shaping.

Quick start

  1. Select exactly one Sound object.
  2. Choose a preset or Manual.
  3. Set the LFO rate, minimum and maximum target frequencies, and waveform.
  4. Use Envelope_width_Hz for a broader or narrower target region and Sweep_strength_dB for effect depth.
  5. Adjust Dry_wet_mix. A value of 0 returns a bypass copy without running the FormantPath or STFT processing.
  6. Leave Preserve_frame_energy on for more stable grain-to-grain level unless you specifically want the spectral reshaping to alter local energy more freely.
The sound must be long enough for stable formant analysis: at least 150 ms and at least three analysis windows. The requested sweep range must also remain below Nyquist.

Signal flow

1. Copy the input and shift the work copy to t = 0 2. Choose an analysis source for multichannel input 3. FormantPath (Burg) → F1 median + F1 interquartile range 4. Build an adaptive grain/hop grid 5. For each grain: Hann analysis window → Spectrum remove broad energy around measured F1 region add broad energy around the current LFO target optional per-grain energy correction inverse transform → Hann synthesis window 6. Weighted overlap-add with Hann² normalization 7. Optional high-cut and fades on the wet path 8. Dry/wet blend 9. Output-level stage 10. Restore the original start time

F1 landmark

The default multichannel analysis source is the loudest channel. The advanced dialog can instead use channel 1 or a mono sum. FormantPath then supplies the first-formant track, from which the script takes the median, 25th percentile and 75th percentile. The source spectral region is widened according to the F1 interquartile spread so natural F1 motion is not treated as a single narrow frequency.

Adaptive WOLA geometry

The update rate is adaptive: at least 20 updates per second, up to 80, with a target of about 16 updates per LFO cycle. Grains use an adaptive duration between roughly 40 and 100 ms. Hann analysis and synthesis windows are combined with a Hann² weight buffer for normalized overlap-add reconstruction.

Frame-energy preservation

When Preserve_frame_energy is enabled, the script measures spectral energy before and after shaping and applies a compensating correction. That correction is limited to ±3 dB per grain, preventing the energy normalizer itself from creating extreme gain changes.

Presets

Presets replace the LFO rate, target range, envelope width, sweep strength, LFO shape and dry/wet mix. They do not override the energy-preservation switch, optional high-cut, visualization/playback choices, or advanced output settings.

PresetRateTarget rangeShapeWidthStrengthMix
Gentle Vowel Morph0.3 Hz700–1200 HzSine330 Hz8 dB0.65
Robot Voice2.0 Hz400–2000 HzSquare450 Hz20 dB0.90
Talking Synth0.5 Hz600–1800 HzTriangle390 Hz15 dB0.80
Underwater0.2 Hz300–800 HzSine660 Hz13 dB0.90
Alien Speech1.5 Hz800–3000 HzSawtooth360 Hz22 dB0.85
Fast Wobble4.0 Hz500–2500 HzSine390 Hz17 dB0.75
Slow Sweep0.1 Hz400–3500 HzReverse sawtooth450 Hz20 dB1.00

Main controls

ControlDefaultWhat it changes
Rate_Hz1.0LFO rate. The grain update rate adapts to the absolute value of this rate.
Min_freq_Hz / Max_freq_Hz500 / 3500Lower and upper spectral-envelope target frequencies. The maximum must remain below Nyquist.
Lfo_shapeSineSine, Triangle, Square, Sawtooth, or Reverse Sawtooth.
Envelope_width_Hz360 HzControls the broad target-envelope width. Internally the target width is never narrower than 180 Hz.
Sweep_strength_dB14 dBDepth of the source-region dip / target-region lift. Valid range: greater than 0 to 36 dB.
Preserve_frame_energyOnCompensates each processed grain toward its pre-shaping spectral energy, limited to ±3 dB.
Dry_wet_mix1.0Linear blend between the original channel and the processed channel. At exactly 0, the script takes its bypass path.
Apply_high_cutOffOptionally applies a Praat Hann-band low-pass to the wet signal before dry/wet mixing.
High_cut_Hz8000 HzHigh-cut target, automatically limited to 100 Hz below Nyquist.
Draw_visualizationOnDraws the LFO target, output spectrogram and summary.
Play_resultOnPlays the final output; if its stored peak exceeds 1, playback uses a temporary safe copy.

Advanced settings

Enable Advanced_settings in the main form to open a second dialog.

ControlDefaultBehavior
Analysis_sourceLoudest channelFor multichannel input, choose channel 1, the RMS-loudest channel, or a mono sum. The mono-sum option can cancel anti-phase material.
Formant_time_step_ms10 msTime step used by FormantPath.
Formant_window_ms30 msFormant-analysis window. Very short files are rejected relative to this value.
Formant_ceiling_Hz5500 HzMiddle FormantPath ceiling; automatically reduced when required by the input Nyquist frequency.
Apply_fadesOffApplies linear fade-in/out to the wet path before dry/wet mixing.
Fade_ms10 msFade duration, limited to at most one quarter of the sound.
Output_level_modeMatch input RMS + safety ceilingChooses the final level policy.
Ceiling_peak0.95Peak target for the safety-ceiling and normalization modes.

Output & visualization

Channels, timing and naming

Every input channel is processed independently with the same measured F1 landmark and the same LFO trajectory. Channel count, sample rate and duration are preserved. Processing is performed on a work copy starting at time 0, and the original start time is restored afterward. The normal output name is <original>_swept_<preset>; the 0% bypass path uses <original>_swept_Bypass. The original Sound remains unchanged.

Output level modes

ModeBehavior
None (natural level)No level change after dry/wet mixing.
Match input RMS + safety ceilingFirst matches the multichannel output RMS to the input RMS; if the resulting peak exceeds the ceiling, it then attenuates to the ceiling.
Safety ceilingAttenuates only when the output peak is above Ceiling_peak.
Peak normalizeAlways scales any nonzero output so its peak equals Ceiling_peak.

Visualization

The Picture page is 8 inches high and uses a centered excerpt of at most 8 seconds. The first panel shows the LFO spectral-envelope target and a horizontal line at the measured F1 median. The second panel shows a mono-fold output spectrogram up to 5 kHz or Nyquist, with the target trajectory overlaid in yellow. A summary strip reports the F1 landmark, source/target envelope widths, sweep strength, grain/hop geometry, input/output peak and RMS, and the level action.

The F1-median reference line is drawn as a solid line in v1.1, even though the current Picture caption calls it “dotted”. This is only a labeling inconsistency in the visualization.

Determinism

The processor uses no random numbers or random seed. With the same sound and settings, the LFO trajectory and spectral shaping are deterministic.