Dynamic Formant Sweeper — User Guide
Real‑time formant manipulation: applies LFO‑modulated formant filtering for vocal morphing, robotic effects, and dynamic spectral reshaping.
What this does
This script implements dynamic formant sweeping — a real‑time approach to vocal and timbral transformation using LFO‑modulated formant filters. The process extracts the source signal via inverse LPC, creates a time‑varying formant filter whose first formant (F1) is controlled by an LFO, and resynthesizes the sound with the moving filter. The result is a continuously morphing spectral envelope that can simulate vowel transitions, robotic voices, underwater effects, alien speech, and more.
Key Features:
- 7 Built‑in Presets — Gentle vowel morph, robot voice, talking synth, underwater, alien speech, fast wobble, slow sweep
- 5 LFO Waveforms — Sine, triangle, square (chopper), sawtooth, reverse sawtooth
- Full Parameter Control — Rate, frequency range, bandwidth, frame duration, dry/wet mix
- Stereo‑Safe Processing — Automatically converts stereo to mono for filtering, then back to stereo
- Visualization — Draws LFO trajectory and spectrogram with overlaid F1 movement
- Non‑Destructive — Original sound preserved; output is a new object
Technical Implementation: (1) Source‑Filter Separation: Extract the source signal (glottal pulse or noise) using inverse LPC filtering. (2) LFO‑Driven Formant Filter: Create a formant object and modify its F1 frequency according to the selected LFO waveform and rate. (3) Resynthesis: Filter the source with the time‑varying formant filter. (4) Dry/Wet Mix: Blend the processed signal with the original. (5) Visualization: Plot the LFO trajectory and a spectrogram showing the moving formant. The script handles stereo files by converting to mono for processing, then reconstituting stereo output.
Quick start
- In Praat, select exactly one Sound object.
- Run script… →
dynamic_formant_sweeper.praat. - Choose a Preset or select “Custom” to adjust all parameters manually.
- Adjust LFO parameters (rate, min/max frequency, waveform).
- Set filter bandwidth and frame duration.
- Control dry/wet mix (0 = dry/original, 1 = fully processed).
- Enable Draw_visualization to see the LFO curve and spectrogram.
- Click OK — the swept sound appears as “originalname_swept_presetname”.
Formant & LFO Theory
Formant Filtering Basics
Source‑Filter Model
The human voice (and many instruments) can be modeled as:
First Formant (F1) Movement
F1 frequency correlates with jaw opening:
- Low F1 (200–400 Hz): Closed jaw, vowels like /i/, /u/
- High F1 (600–1000 Hz): Open jaw, vowels like /a/, /æ/
By sweeping F1 with an LFO, we simulate a continuously changing jaw opening—even on non‑speech sounds.
LFO Modulation
LFO Waveforms
📈 LFO Shapes & Sound Character
Sine: Smooth, natural vowel transitions. Sounds organic, vocal‑like.
Triangle: Linear sweeps up and down. Slightly more synthetic than sine.
Square (Chopper): Abrupt jumps between two frequencies. Creates robotic, stuttering effects.
Sawtooth: Gradual rise then sudden drop. “Zipper” or “laser” effects.
Reverse Sawtooth: Sudden rise then gradual fall. Less common, creates unique tension.
Modulation Range
The LFO moves F1 between min_freq_Hz and max_freq_Hz.
Processing Pipeline
Frame‑Based Processing
Formant analysis is performed on short, overlapping frames.
Preset Descriptions
Built‑in Presets
| Preset | Rate (Hz) | F1 Range (Hz) | LFO Shape | Character |
|---|---|---|---|---|
| Gentle Vowel Morph | 0.3 | 700–1200 | Sine | Smooth, natural vowel‑like sweeps |
| Robot Voice | 2.0 | 400–2000 | Square | Chopping, synthetic, robotic |
| Talking Synth | 0.5 | 600–1800 | Triangle | Articulated, synth‑voice, clear sweeps |
| Underwater | 0.2 | 300–800 | Sine | Slow, murky, resonant |
| Alien Speech | 1.5 | 800–3000 | Sawtooth | Rising “zipper” effects, unnatural |
| Fast Wobble | 4.0 | 500–2500 | Sine | Rapid, vibrato‑like modulation |
| Slow Sweep | 0.1 | 400–3500 | Reverse Sawtooth | Very gradual, evolving texture |
🎭 Preset Deep Dive: Gentle Vowel Morph
Intended use: Natural‑sounding vowel transitions on speech or sung material.
Parameters: Rate = 0.3 Hz (slow), F1 range = 700–1200 Hz (typical vowel range), LFO = sine (smooth), bandwidth = 80 Hz (narrow, resonant), mix = 60% (subtle).
Result: The sound appears to slowly alternate between /a/‑like and /e/‑like colors, as if the jaw is gently opening and closing.
🤖 Preset Deep Dive: Robot Voice
Intended use: Classic “robot” or “chopper” effect.
Parameters: Rate = 2 Hz (medium‑fast), F1 range = 400–2000 Hz (wide), LFO = square (abrupt jumps), bandwidth = 150 Hz (wider, less resonant), mix = 85% (strong effect).
Result: The formant abruptly switches between two extreme frequencies, creating a stuttering, synthetic character.
🌊 Preset Deep Dive: Underwater
Intended use: Murky, resonant, “underwater” or “telephone” effect.
Parameters: Rate = 0.2 Hz (very slow), F1 range = 300–800 Hz (low), LFO = sine (smooth), bandwidth = 200 Hz (wide, diffuse), mix = 90% (almost fully processed).
Result: A slow, low‑frequency sweep that mimics the fluctuating resonances of water or a narrow‑band transmission.
Parameters & Controls
LFO Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| Rate_Hz | real | 1.0 | LFO frequency in Hz (0.05–10 Hz typical) |
| Min_freq_Hz | positive | 500 | Minimum F1 frequency (Hz) |
| Max_freq_Hz | positive | 3500 | Maximum F1 frequency (Hz) |
| Lfo_shape | option | Sine | Waveform: Sine, Triangle, Square, Sawtooth, Reverse Sawtooth |
Filter Shape
| Parameter | Type | Default | Description |
|---|---|---|---|
| Bandwidth_Hz | positive | 100 | Bandwidth of the first formant (Hz). Wider = less resonant, more diffuse. |
Processing Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| Frame_duration_ms | positive | 25 | Analysis frame duration in milliseconds (10–50 ms typical) |
| Dry_wet_mix | real | 1.0 | Mix between original (0) and processed (1) signal |
Output Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| Draw_visualization | boolean | 1 | Draw LFO curve and spectrogram after processing |
| Play_result | boolean | 1 | Play the result automatically |
Applications
Vocal Transformation
Use case: Turn normal speech into singing‑like vowel sweeps, or create “talking synth” effects.
Technique: Use Gentle Vowel Morph or Talking Synth preset with dry/wet mix around 0.6–0.8.
Example: Apply to a spoken phrase; the formant sweeps give the impression of melodic vowel changes.
Robot & Sci‑Fi Effects
Use case: Classic robot voices, alien communication, computer‑generated speech.
Technique: Use Robot Voice (square LFO) or Alien Speech (sawtooth LFO) with high mix (0.8–1.0).
Workflow:
- Record a short command or phrase
- Apply Robot Voice preset
- Adjust rate to match desired “syllabic” rhythm
- Blend with dry signal if needed for intelligibility
Textural Sound Design
Use case: Create evolving pads, underwater atmospheres, or moving resonances for film/game audio.
Technique: Use Underwater or Slow Sweep preset on sustained sounds (pads, drones, noise).
Advantages:
- Adds motion to static sounds
- Creates “living” textures
- Can be automated (via parameter changes) for evolving scenes
Instrument Processing
Use case: Add vocal‑like formant movement to instruments (guitar, synthesizer, wind instruments).
Technique: Use Fast Wobble (sine, 4 Hz) for a vibrato‑like effect, or Gentle Vowel Morph for slower, vowel‑colored sweeps.
Example: Apply to a synth pad; the moving formant adds a “talking” quality without pitch change.
Experimental Composition
Use case: Generate complex, unpredictable timbral changes for electroacoustic music.
Technique: Chain multiple instances with different LFO rates and shapes, or automate parameter changes via scripting.
Example: Process a percussion loop with Alien Speech (sawtooth, 1.5 Hz), then again with Slow Sweep (reverse sawtooth, 0.1 Hz) for layered motion.
Practical Workflow Examples
🎤 Vocal Thickening (Music Production)
Goal: Add subtle, moving formant energy to double‑tracked vocals.
Settings:
- Preset: Gentle Vowel Morph
- Dry/wet mix: 0.3–0.4
- Rate: 0.4 Hz
- F1 range: 600–1400 Hz
Result: The vocal gains a slowly shifting resonance that thickens the texture without obvious robotic artifacts.
🎬 Sci‑Fi Interface (Film Sound Design)
Goal: Create a “scanning” or “communicator” beep.
Settings:
- Preset: Robot Voice
- Dry/wet mix: 1.0
- Rate: 1.5 Hz
- F1 range: 800–2200 Hz
- Apply to a short sine‑wave beep (1000 Hz)
Result: A synthetic, choppy beep that sounds like a machine‑generated signal.
🌌 Ambient Pad Processing (Electronic Music)
Goal: Turn a static synth pad into a slowly evolving, vowel‑like texture.
Settings:
- Preset: Slow Sweep
- Dry/wet mix: 0.8
- Rate: 0.08 Hz (very slow)
- F1 range: 400–1200 Hz
- Bandwidth: 150 Hz
Result: A pad that gradually shifts its spectral center, creating a sense of slow breath or movement.
Advanced Techniques
- Duplicate the script: Run the script twice on the same sound with different presets (e.g., Robot Voice + Underwater).
- Mix the outputs: Use Praat’s “Combine to stereo” or “Mix” to blend the two processed versions.
- Result: Complex, multi‑rate formant motion that no single LFO could produce.
- Embed the script in a loop that gradually changes rate, range, or mix over time.
- Example: start with Gentle Vowel Morph, end with Alien Speech for a “transformation” effect.
- Use Praat’s “for” loops and “form” commands to create interactive parameter sweeps.
Troubleshooting Common Issues
Cause: Frame duration too short, or LFO rate too high for the frame rate.
Solution: Increase frame_duration_ms (e.g., 40 ms) or reduce rate_Hz.
Cause: Dry/wet mix too low, or F1 range too narrow.
Solution: Increase mix to 0.8–1.0, widen min_freq_Hz and max_freq_Hz.
Cause: LPC analysis failing on non‑vocal sounds (no clear formants).
Solution: Try a different preset (e.g., Underwater uses wider bandwidth) or reduce mix.
Cause: Script converts stereo to mono for processing, then back to stereo. If the original stereo image is lost, it’s because the processing is identical on both channels.
Solution: Process left and right channels separately with slightly different parameters, then recombine.
Technical Deep Dive
LPC Analysis
Burg Method
Linear Predictive Coding (LPC) models the sound as:
Inverse Filtering
Once we have the filter coefficients, we can extract the source by inverse filtering:
Formant Object Manipulation
Formula Interface
Praat allows direct formula‑based modification of formant frequencies and bandwidths.
Bandwidth Control
Bandwidth affects resonance sharpness:
- Narrow bandwidth (50–100 Hz): Sharp resonance, strong “vowel” character
- Wide bandwidth (150–300 Hz): Diffuse resonance, “underwater” or “telephone” effect
Visualization Algorithm
📊 Two‑Panel Visualization
Upper panel: LFO trajectory (F1 frequency vs. time). Shows exactly how the formant moves according to the selected waveform.
Lower panel: Spectrogram of the output sound with the F1 curve overlaid in yellow. This confirms that the formant shift is audible in the output spectrum.
Purpose: Debugging, parameter fine‑tuning, and educational illustration of the effect.