Dynamic Formant Sweeper — User Guide
LFO-controlled spectral-envelope motion around a robust F1 landmark, using short-time spectral shaping rather than LPC resynthesis.
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.
Quick start
- Select exactly one Sound object.
- Choose a preset or Manual.
- Set the LFO rate, minimum and maximum target frequencies, and waveform.
- Use Envelope_width_Hz for a broader or narrower target region and Sweep_strength_dB for effect depth.
- Adjust Dry_wet_mix. A value of 0 returns a bypass copy without running the FormantPath or STFT processing.
- 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.
Signal flow
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.
| Preset | Rate | Target range | Shape | Width | Strength | Mix |
|---|---|---|---|---|---|---|
| Gentle Vowel Morph | 0.3 Hz | 700–1200 Hz | Sine | 330 Hz | 8 dB | 0.65 |
| Robot Voice | 2.0 Hz | 400–2000 Hz | Square | 450 Hz | 20 dB | 0.90 |
| Talking Synth | 0.5 Hz | 600–1800 Hz | Triangle | 390 Hz | 15 dB | 0.80 |
| Underwater | 0.2 Hz | 300–800 Hz | Sine | 660 Hz | 13 dB | 0.90 |
| Alien Speech | 1.5 Hz | 800–3000 Hz | Sawtooth | 360 Hz | 22 dB | 0.85 |
| Fast Wobble | 4.0 Hz | 500–2500 Hz | Sine | 390 Hz | 17 dB | 0.75 |
| Slow Sweep | 0.1 Hz | 400–3500 Hz | Reverse sawtooth | 450 Hz | 20 dB | 1.00 |
Main controls
| Control | Default | What it changes |
|---|---|---|
| Rate_Hz | 1.0 | LFO rate. The grain update rate adapts to the absolute value of this rate. |
| Min_freq_Hz / Max_freq_Hz | 500 / 3500 | Lower and upper spectral-envelope target frequencies. The maximum must remain below Nyquist. |
| Lfo_shape | Sine | Sine, Triangle, Square, Sawtooth, or Reverse Sawtooth. |
| Envelope_width_Hz | 360 Hz | Controls the broad target-envelope width. Internally the target width is never narrower than 180 Hz. |
| Sweep_strength_dB | 14 dB | Depth of the source-region dip / target-region lift. Valid range: greater than 0 to 36 dB. |
| Preserve_frame_energy | On | Compensates each processed grain toward its pre-shaping spectral energy, limited to ±3 dB. |
| Dry_wet_mix | 1.0 | Linear blend between the original channel and the processed channel. At exactly 0, the script takes its bypass path. |
| Apply_high_cut | Off | Optionally applies a Praat Hann-band low-pass to the wet signal before dry/wet mixing. |
| High_cut_Hz | 8000 Hz | High-cut target, automatically limited to 100 Hz below Nyquist. |
| Draw_visualization | On | Draws the LFO target, output spectrogram and summary. |
| Play_result | On | Plays 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.
| Control | Default | Behavior |
|---|---|---|
| Analysis_source | Loudest channel | For 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_ms | 10 ms | Time step used by FormantPath. |
| Formant_window_ms | 30 ms | Formant-analysis window. Very short files are rejected relative to this value. |
| Formant_ceiling_Hz | 5500 Hz | Middle FormantPath ceiling; automatically reduced when required by the input Nyquist frequency. |
| Apply_fades | Off | Applies linear fade-in/out to the wet path before dry/wet mixing. |
| Fade_ms | 10 ms | Fade duration, limited to at most one quarter of the sound. |
| Output_level_mode | Match input RMS + safety ceiling | Chooses the final level policy. |
| Ceiling_peak | 0.95 | Peak 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
| Mode | Behavior |
|---|---|
| None (natural level) | No level change after dry/wet mixing. |
| Match input RMS + safety ceiling | First matches the multichannel output RMS to the input RMS; if the resulting peak exceeds the ceiling, it then attenuates to the ceiling. |
| Safety ceiling | Attenuates only when the output peak is above Ceiling_peak. |
| Peak normalize | Always 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.
Determinism
The processor uses no random numbers or random seed. With the same sound and settings, the LFO trajectory and spectral shaping are deterministic.