Waveguide & Modal Synthesis — User Guide

Physical modeling synthesis engine simulating acoustic instruments through waveguide and modal resonance techniques.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.1 (2025) License: MIT License Repo: https://github.com/ShaiCohen-ops/Praat-plugin_AudioTools
Contents:

What this does

This script synthesizes realistic acoustic instrument sounds using physical modeling — simulating the actual physics of vibrating strings, resonating air columns, struck bars, and other mechanical sound sources. Rather than playing back recordings or using abstract oscillators, it models the propagation of waves through physical structures in real-time.

Key Features:

What is Physical Modeling? Traditional synthesis uses oscillators and filters to create approximate sounds. Physical modeling simulates the actual vibrations, resonances, and energy losses of real instruments. A plucked string model doesn't just play a "string sound" — it actually models wave reflection at both ends of the string, energy damping, and harmonic interactions. The result: infinite variability and natural evolution over time.

Technical Implementation: The script uses two primary techniques. Waveguide synthesis implements digital delay lines with feedback, where delay_samples = sampling_rate / frequency creates the fundamental pitch. Each model type uses specific feedback equations: simple subtraction for strings (Karplus-Strong), nonlinear functions for winds (jet-resonator coupling), multiple delays for bars/bells (inharmonic partials). Modal synthesis (model 15) sums exponentially decaying sinusoids at specific frequency ratios. The chaos parameter introduces controlled randomness into physical parameters (bow pressure variation, reed stiffness fluctuation) rather than adding noise to the output signal.

Quick start

  1. In Praat, Run script…Waveguide & Modal Synthesis.praat.
  2. Select a Model_type (try "Bowed String" or "Struck Bar" first).
  3. Set Duration (3 seconds default is good for most models).
  4. Choose Frequency (220 Hz = A3, common starting point).
  5. Adjust Excitation_strength (0.7 default works well, higher = louder/more aggressive).
  6. Select Envelope (use "No Envelope" first to hear raw model, then try "Percussive").
  7. Click OK — sound generates and plays immediately.
Quick tip: Start with simple models (Bowed String, Blown Pipe) and "No Envelope" to understand the core synthesis. Then experiment with Damping (higher = longer sustain) and Chaos (higher = more variation). Finally, add envelopes for musical shaping.

Physical Modeling Basics

🎻 The Waveguide Principle

Concept: Sound in physical objects = waves traveling back and forth

Digital implementation: Delay line + feedback = wave propagation simulation

Key equation: output[n] = input[n] - damping × output[n - delay_samples]

Why it works: The delay creates the pitch (delay = 1/frequency), feedback creates sustain, damping simulates energy loss

Fundamental Physics Concepts

1. Delay Lines (Pitch Generation)

The core of waveguide synthesis. For frequency F Hz at sample rate 44100 Hz:

delay_samples = 44100 / F

Example: 220 Hz (A3) → 44100/220 = 200.45 samples delay ≈ 4.5 ms round-trip time

This delay makes the output "remember" itself from one period ago, creating the fundamental frequency.

2. Feedback & Damping (Sustain)

Damping parameter (0.9-0.999) controls how much energy remains after each cycle:

Each cycle, signal multiplies by damping value. After N cycles: amplitude = initial × damping^N

3. Excitation (Initial Energy)

Different instruments are excited differently:

4. Nonlinearity (Realism)

Real instruments aren't perfectly linear. Nonlinear elements create:

Karplus-Strong Algorithm (1983): The foundational waveguide technique used here was discovered by Kevin Karplus and Alex Strong. Originally designed to synthesize plucked strings, it uses: (1) fill delay line with noise, (2) repeatedly average adjacent samples and feed back. Incredibly simple yet produces convincing string sounds. Modern physical modeling extends this with nonlinear feedback, multiple delays, and excitation models.

Modal Synthesis Approach

An alternative to waveguides. Instead of simulating wave propagation, modal synthesis directly generates resonant frequencies (modes):

Sum of modes: output = Σ (amplitude[i] × sin(2πf[i]t) × exp(-decay[i]t))

Each mode = one resonant frequency of the object. Works well for inharmonic sounds (bells, gongs, bars) where partials aren't integer multiples of fundamental.

Model Types (15 Instruments)

String Instruments

1. Bowed String Sustained

Physics: Bow friction excites string continuously. Stick-slip phenomenon creates sawtooth-like waveform.

Implementation: Continuous Gaussian noise excitation modulated by bow pressure. Feedback includes sinusoidal bow pressure variation (20 Hz rate).

Formula: self - damping×self[delay] × (1 + bow_pressure×sin(20t))

Sound character: Sustained tone with subtle pressure fluctuations, violin/cello-like

Control tips: Higher excitation_strength = more bow pressure (brighter, harsher). Higher chaos adds vibrato-like variation.

Best settings: Damping 0.998-0.999, Excitation 0.5-0.8, Chaos 0.2-0.4 for realistic violin

7. Hammered String Percussive

Physics: Hammer strikes string, creating sharp attack followed by decay. Hammer stiffness affects tone.

Implementation: Initial noise burst with exponential decay (30 samples). Includes dispersion term (difference between adjacent delayed samples) simulating stiffness.

Formula: self - damping×self[delay] - stiffness×(self[delay] - self[delay-1])

Sound character: Piano-like attack with bright transient

Control tips: Lower excitation_strength = softer hammer (less brightness). Damping controls sustain pedal effect.

Best settings: Damping 0.996-0.998, Excitation 0.6-0.9, try with Percussive or ADSR envelope

12. Bowed Glass Ethereal

Physics: Wet finger on wine glass rim. Higher damping than strings, unique friction behavior.

Implementation: 1.5× frequency delay (harmonic shift), chaos-modulated bow velocity with nested sine waves.

Formula: self - (damping+0.003)×self[1.5×delay] × (1 + velocity×sin(15t+chaos×sin(3t)))

Sound character: Ethereal, pure, glass harmonica-like

Control tips: Chaos creates subtle pitch warbling. Use high damping (0.998+) and Slow Fade envelope.

Best settings: Damping 0.998-0.999, Excitation 0.4-0.6, Chaos 0.3-0.5, higher frequencies (300-600 Hz)

Wind Instruments

2. Blown Pipe Sustained

Physics: Air jet excites resonant tube. Jet-edge interaction creates oscillation.

Implementation: Continuous modulated noise excitation + waveguide feedback. Band-pass filtering emphasizes fundamental.

Formula: self - damping×self[delay] + 0.1×noise×breath_pressure

Sound character: Flute/recorder-like, breathy but tonal

Control tips: Excitation_strength = breath pressure. Higher values = louder but noisier (overblown).

Best settings: Damping 0.995-0.997, Excitation 0.5-0.7, use Swell or ADSR envelope for phrasing

5. Blown Bottle Resonant

Physics: Helmholtz resonator — air in bottle neck oscillates like spring-mass system.

Implementation: 0.8× frequency delay (lower resonance), sinusoidally modulated excitation. Heavy band-pass filtering.

Formula: self - damping×self[0.8×delay] + 0.05×noise

Sound character: Deep, hollow, jug-like tone

Control tips: Lower frequencies (80-150 Hz) most realistic. Chaos affects turbulence.

Best settings: Damping 0.993-0.996, Excitation 0.6-0.8, Frequency 80-150 Hz, Tremolo envelope adds realism

8. Reed Pipe Buzzy

Physics: Vibrating reed modulates airflow. Reed stiffness affects waveform.

Implementation: Reed stiffness modulates initial excitation. Feedback includes sinusoidal modulation at fundamental frequency.

Formula: noise×(1 - reed_stiffness×|sin(200t)|) then self - damping×self[delay]×(1+0.2×sin(2πft))

Sound character: Clarinet/oboe-like, reedy with odd harmonics

Control tips: Chaos directly controls reed stiffness (0.5-0.8 range). Creates warbling quality.

Best settings: Damping 0.996-0.998, Excitation 0.5-0.7, Chaos 0.2-0.5, ADSR envelope for articulation

9. Brass Lip Bright

Physics: Lip vibration (buzzing) excites brass tube. Nonlinear lip behavior creates rich harmonics.

Implementation: Conditional feedback based on signal amplitude threshold (lip opening/closing). Continuous weak noise injection.

Formula: self - damping×self[delay] × (if |self| < tension then 1 else 0.5) + 0.05×noise

Sound character: Trumpet/horn-like, brassy with strong attack

Control tips: Excitation = lip tension. Lower values = softer attack. Use Gate envelope for fanfare effects.

Best settings: Damping 0.995-0.998, Excitation 0.6-0.9, Percussive envelope for brass hits

14. Breath Noise Textural

Physics: Turbulent airflow without strong resonance. Filtered noise with pitch emphasis.

Implementation: Gaussian noise modulated by sine at fundamental, chaos adds LFO. Wide band-pass filtering.

Formula: turbulence×noise×(1+sin(2πft))×(1+chaos×sin(10t))

Sound character: Breathy, wind-like, no clear pitch but tonal center

Control tips: More textural than tonal. Use for pads, wind effects, atmospheric layers.

Best settings: Damping irrelevant (no feedback), Excitation 0.4-0.7, Chaos 0.4-0.7, Tremolo envelope

Percussion & Bars

3. Struck Bar Metallic

Physics: Metal/wood bar with inharmonic partials. Two main modes: fundamental and 2.756× harmonic.

Implementation: Brief noise burst, then feedback from two delay lines at inharmonic ratio.

Formula: self - damping×(self[delay] + 0.7×self[2.756×delay])

Sound character: Xylophone/vibraphone-like, clear pitch with metallic timbre

Control tips: Damping controls sustain. Lower = wood, higher = metal character.

Best settings: Damping 0.993-0.996, Excitation 0.7-0.9, Percussive envelope, frequencies 200-800 Hz

11. Struck Bell Inharmonic

Physics: Bell with multiple inharmonic modes (2.14×, 3.41×, 4.09× fundamental).

Implementation: Four delay lines at empirically-derived bell mode ratios. Short noise burst excitation.

Formula: self - damping×(self[delay] + 0.6×self[2.14×delay] + 0.4×self[3.41×delay] + 0.2×self[4.09×delay])

Sound character: Complex, shimmering, gong/bell-like with long decay

Control tips: Use high damping (0.998+) for long sustain. Lower frequencies (100-250 Hz) most bell-like.

Best settings: Damping 0.997-0.999, Excitation 0.6-0.8, Slow Fade envelope, low frequencies

Membranes & Surfaces

4. Plucked Membrane Drum-like

Physics: 2D membrane (drumhead) with multiple vibrational modes.

Implementation: Three delay lines at ratios approximating circular membrane modes (1.593×, 2.135×).

Formula: self - damping×(self[delay] + 0.5×self[1.593×delay] + 0.3×self[2.135×delay])

Sound character: Tabla/bongo-like, pitched drum with inharmonic overtones

Control tips: Lower damping than strings (0.992-0.995) for realistic drum decay.

Best settings: Damping 0.992-0.995, Excitation 0.7-0.9, Percussive envelope, 80-200 Hz

6. Scraped Surface Irregular

Physics: Stick-slip friction like scraping wood or metal. Irregular excitation pulses.

Implementation: Probabilistic noise bursts (30% of excitation_strength chance) modulated by sine. Short delay (0.5×) creates high-pitch component.

Formula: if random < 0.3×excitation then noise×sin(2πft) else self - 0.7×self[0.5×delay]

Sound character: Scratchy, irregular, guiro/washboard-like

Control tips: Excitation controls scraping pressure (higher = more frequent). Chaos adds irregularity.

Best settings: Excitation 0.5-0.8, Chaos 0.4-0.7, Gate or Stutter envelope for rhythmic patterns

13. Friction Drum Pulsing

Physics: Cuica/friction drum — periodic stick-slip creates rhythmic pulses.

Implementation: Noise bursts at regular intervals (100 - friction×80 samples). Chaos adds amplitude variation.

Formula: if col mod period = 0 then friction×noise else self - damping×self[delay]×(1+0.3×chaos_noise)

Sound character: Rhythmic, grunting/roaring quality

Control tips: Excitation controls pulse rate (higher = faster). Chaos creates amplitude irregularity.

Best settings: Damping 0.993-0.996, Excitation 0.5-0.8, Chaos 0.3-0.6, frequencies 80-150 Hz

Vocal & Resonator Models

10. Vocal Tract Formant

Physics: Glottal pulse excites vocal tract resonances (formants).

Implementation: Periodic sinusoidal excitation + waveguide. Two band-pass filters at formant frequencies (2.5× and 4× fundamental, chaos varies formant 2).

Formula: noise×|sin(2πft)| then self - damping×self[delay], then formant filtering

Sound character: Synthetic vowel-like, formant synthesis quality

Control tips: Chaos shifts formant 2 (±200 Hz) creating vowel morphing. Low frequencies (80-150 Hz) most voice-like.

Best settings: Damping 0.996-0.998, Excitation 0.5-0.7, Chaos 0.3-0.5, Tremolo envelope, 80-150 Hz

15. Modal Resonator Pure

Physics: Bank of resonant modes, each with independent frequency and decay. Classic modal synthesis.

Implementation: Five modes sum exponentially decaying sinusoids. Mode frequencies: f × (1 + (i-1) × (1 + chaos×0.5)). Plus initial impulse.

Formula: Σ (amp/i × sin(2πf[i]t) × exp(-t×(1-decay[i])×50)) + impulse

Sound character: Pure, resonant, tuned percussion-like. Inharmonic if chaos > 0.

Control tips: Chaos spreads mode frequencies (0 = harmonic, 1 = highly inharmonic). Damping controls overall decay.

Best settings: Damping 0.995-0.999, Excitation 0.5-0.8, Chaos 0.0 for harmonic, 0.5-0.8 for bell-like

Envelope Shapers (10 Options)

Envelopes shape the amplitude evolution over time. Applied after synthesis, they don't affect the physical model itself but control how the sound is presented.

1. No Envelope Raw

Effect: None — raw model output

Use case: Hearing pure model behavior, analysis, sustained models (bowed string, blown pipe)

Technical: Only peak normalization to 0.95. Best for understanding model