Competing Modulators — User Guide
Complex FM synthesis with multiple "voices" (modulation processes) that interfere, compete, and create emergent textures through frequency‑modulation‑induced chaos, sidebands, and inharmonic spectra.
What this does
This script implements multi‑voice competing modulation synthesis — a technique where several independent frequency‑modulation (FM) "voices" are simultaneously active, each with its own modulator/carrier relationship, and their outputs are mixed together. Unlike traditional FM synthesis with carefully tuned ratios, here the modulators are designed to "compete": they have non‑integer frequency ratios, chaotic modulation indices, and sometimes exponential FM (where the modulation depth itself modulates). The result is a dense, evolving texture rich with inharmonic sidebands, beating patterns, and emergent rhythms that sound like electronic life‑forms, chaotic machinery, or abstract sonic conflicts.
Key Features:
- 15 Themed Presets — Gentle Chaos to Quantum Entanglement, each with distinct modulation character
- 3‑Layer Architecture — Preset (modulation character), Envelope (amplitude shaping), Spatial mode (stereo imaging)
- Configurable Voices — 2‑6 independent FM voices, each with unique modulation patterns
- 10 Envelope Types — From classic ADSR to chaotic Random Bursts
- 6 Spatial Modes — Mono to extreme stereo separation with rotating/ping‑pong effects
- Non‑Linear FM — Exponential modulation, modulation‑of‑modulation, chaotic indices
- Real‑time Generation — All synthesis via Praat's formula interpreter (no external samples)
- Non‑integer ratios: Voices detuned relative to each other (e.g., 1:1, 1.3:1, 1.7:1)
- Chaotic modulation indices: Modulation depth varies over time, sometimes chaotically
- Modulation of modulation: The modulator frequency itself may be FM'ed (nested FM)
- Exponential FM: Carrier frequency multiplied by exp(modulator) instead of (1 + modulator)
- Sideband clashes: Sidebands from different voices interact, creating beating and new frequencies
Technical Implementation: The script builds a massive additive‑FM formula in Praat's formula language. For each voice, it constructs an expression of the form: amp × sin(2π × base × ratio × x × (1 + depth × modulator(x))) or variations (exponential, nested). All voices are summed. Then an envelope is applied (via Formula commands), followed by spatial processing (creating stereo versions with filtering/panning). The formula‑based approach allows arbitrarily complex modulation without runtime loops; all complexity is baked into the mathematical expression that Praat interprets sample‑by‑sample.
Quick start
- In Praat, ensure no objects are selected.
- Run script… →
competing_modulators.praat. - Choose a Preset (e.g., Gentle Chaos, Alien Chorus, Quantum Entanglement).
- Select an Envelope type (Percussive, Slow Fade, ADSR, etc.).
- Choose a Spatial_mode (Mono, Stereo Voices, Rotating Modulators, etc.).
- Adjust basic parameters if needed (Duration, Base_frequency, Modulation_intensity, Number_voices).
- Click OK — script generates sound, applies envelope/spatial processing, plays result.
- Output sound appears in Objects list with descriptive name.
Modulation Theory & Competing FM
Basic FM Synthesis
📐 Classic FM Equation
Single modulator‑carrier pair:
Competing FM Principles
⚔️ How Voices "Compete"
Spectral competition:
Voice 1: f_c = 100 Hz, f_m = 130 Hz (ratio 1:1.3)
→ sidebands at 100 ± k×130 Hz
-30, 100, 230, 360, 490...
Voice 2: f_c = 120 Hz, f_m = 190 Hz (ratio 1:1.583)
→ sidebands at 120 ± k×190 Hz
-70, 120, 310, 500...
Sideband collisions:
230 Hz (Voice 1) vs 310 Hz (Voice 2) → 80 Hz beat
360 Hz (Voice 1) vs 310 Hz (Voice 2) → 50 Hz beat
Temporal competition: Modulation indices vary over time, causing sideband amplitudes to wax/wanes, creating evolving loudness battles.
Phase competition: Initial phases are arbitrary, causing constructive/destructive interference that changes with time.
Advanced FM Variations Used
Spectral Emergence
Complete Signal Flow
Voice Architecture
Voice 1: Brownian‑Like Modulation
🌊 Drifting, Organic
Formula pattern:
Characteristics: Two unrelated low‑frequency modulators (0.2 Hz and 1.7 Hz) sum to create a quasi‑random walk in modulation depth. Produces slow, organic drift with occasional faster fluctuations. Sounds natural, like wind or water.
Spectral effect: Sideband amplitudes drift slowly, creating evolving timbre without abrupt changes.
Voice 2: Chaotic Nested FM
🌀 Nested Complexity
Formula pattern:
Characteristics: Modulator frequency (3 Hz) is itself FM'ed by a 0.8 Hz sine (phase modulation). Creates complex, non‑linear evolution with periodic but intricate patterns. The nesting creates sidebands of sidebands.
Spectral effect: Rich, metallic timbres with beating patterns that repeat every 1.25 seconds (1/0.8).
Voice 3: Random‑Walk Simulation
📈 Time‑Varying Depth
Formula pattern:
Characteristics: Modulation depth increases linearly over time (ramp from 0 to maximum), creating a systematic spectral broadening. The 5 Hz modulator provides fast fluctuations.
Spectral effect: Starts relatively simple (few sidebands), grows increasingly complex and noisy toward the end. Creates narrative arc.
Voice 4+: Exponential FM
💥 Extreme Spectral Broadening
Formula pattern:
Characteristics: Exponential FM (carrier multiplied by exp(modulator) rather than (1+modulator)) creates extreme sideband generation even with small modulation indices. The negative sign creates asymmetric modulation.
Spectral effect: Dense, noise‑like spectra with pronounced 2 Hz amplitude fluctuation (from the modulator). Can become chaotic for intensity > 0.7.
Preset‑Specific Voice Designs
Amplitude Normalization
Voice amplitude scaling: Each voice gets amp = 1.0 / number_voices so that summing all voices gives approximately unity gain (assuming uncorrelated signals).
Global amplitude envelope: All voices are multiplied by (0.6 + 0.4 × sin(2π × 0.1 × t)) — a gentle 0.1 Hz (10‑second period) tremolo that adds slow amplitude variation and prevents static textures.
Preset Characters
Gentle Chaos (Preset 2)
🌿 Subtle, Organic Drift
Parameters:
- Base frequency: 100 Hz
- Modulation intensity: 0.3 (low)
- Number voices: 3
Modulation style: All voices use the Brownian‑like pattern (two unrelated low‑frequency modulators). Creates slow, natural‑sounding drift with subtle complexity.
Sonic character: Evolving ambient pad. Gentle enough for background textures, complex enough to stay interesting. Good introduction to competing modulators.
Best with: Slow Fade envelope, Stereo Voices spatial mode.
Metallic Clash (Preset 3)
⚔️ Harsh, Percussive
Parameters:
- Base frequency: 180 Hz
- Modulation intensity: 0.8 (high)
- Number voices: 5
Modulation style: High‑ratio nested FM with strong 0.5 Hz phase modulation. Creates periodic "clangs" every 2 seconds.
Sonic character: Industrial, mechanical sounds. Like metal sheets being struck or machinery with loose parts. Aggressive and rhythmic.
Best with: Percussive or Gate envelope, Ping Pong War spatial mode.
Organic Swarm (Preset 4)
🐝 Insect‑Like Collective
Parameters:
- Base frequency: 80 Hz
- Modulation intensity: 0.4 (medium)
- Number voices: 6 (many)
Modulation style: Natural‑sounding modulators with ratios around 0.7×voice number. Creates overlapping but distinct buzzing patterns.
Sonic character: Swarm of insects, beehive activity, or rustling leaves. Many independent elements creating collective motion.
Best with: No envelope or Slow Fade, Binaural Chaos spatial mode.
Alien Chorus (Preset 7)
👽 Synthetic Vocalizations
Parameters:
- Base frequency: 140 Hz
- Modulation intensity: 0.9 (very high)
- Number voices: 5
Modulation style: Exponential FM with harmonically related modulators (3×voice Hz). Creates vowel‑like formants through spectral peaks.
Sonic character: Sci‑fi alien voices, synthetic choir, or processed vocal samples. Uncanny valley between human and machine.
Best with: ADSR or Swell envelope, Rotating Modulators spatial mode.
Liquid Modulation (Preset 13)
💧 Flowing, Fluid Motion
Parameters:
- Base frequency: 70 Hz
- Modulation intensity: 0.4 (medium)
- Number voices: 3
Modulation style: Nested FM with time‑varying modulator frequency (warbling at 0.2 Hz). Creates smooth, continuous timbral changes.
Sonic character: Water flowing, liquid morphing, mercury movement. Smooth yet complex, with no sharp transitions.
Best with: Slow Fade envelope, Stereo Voices spatial mode.
Quantum Entanglement (Preset 16)
⚛️ Extreme, Unpredictable
Parameters:
- Base frequency: 190 Hz
- Modulation intensity: 1.0 (maximum)
- Number voices: 6 (maximum)
Modulation style: Mix of all techniques: exponential, nested, Brownian, chaotic. Maximum complexity.
Sonic character: Chaotic noise with structure, like malfunctioning quantum computer or extreme data corruption. Constantly surprising.
Best with: Random Bursts or Stutter envelope, Wide Field spatial mode.
All Presets Summary
| Preset | Base Freq | Intensity | Voices | Character | Best Use |
|---|---|---|---|---|---|
| Gentle Chaos | 100 | 0.3 | 3 | Organic drift | Ambient backgrounds |
| Metallic Clash | 180 | 0.8 | 5 | Industrial percussion | Rhythmic elements |
| Organic Swarm | 80 | 0.4 | 6 | Insect collective | Nature sound design |
| Digital Warble | 200 | 0.7 | 4 | Glitchy digital | IDM/glitch music |
| Harmonic Battle | 150 | 0.6 | 4 | Tonal conflict | Experimental music |
| Alien Chorus | 140 | 0.9 | 5 | Synthetic vocals | Sci‑fi effects |
| Glitchy Modulation | 220 | 1.0 | 3 | Extreme digital | Glitch art |
| Rhythmic Conflict | 110 | 0.5 | 4 | Complex rhythms | Percussion beds |
| Spectral War | 160 | 0.8 | 6 | Frequency battles | Sound design conflicts |
| Cosmic Interference | 90 | 0.7 | 5 | Space radio | Space atmospheres |
| Mechanical Discord | 130 | 0.9 | 4 | Machine malfunction | Industrial soundscapes |
| Liquid Modulation | 70 | 0.4 | 3 | Fluid motion | Liquid textures |
| Crystal Resonance | 240 | 0.6 | 4 | Glass/metallic | Bell‑like tones |
| Neural Network | 170 | 0.8 | 5 | AI‑like thinking | Tech interfaces |
| Quantum Entanglement | 190 | 1.0 | 6 | Maximum chaos | Extreme textures |
Envelope Types
No Envelope
📈 Flat Amplitude
Effect: No amplitude shaping applied — the natural amplitude fluctuations from modulation remain.
Use case: When you want the pure, unmodified modulation texture. Good for very long drones where envelope would be distracting.
Formula: self * 1.0 (no change)
Percussive
🥁 Exponential Decay
Effect: Sharp attack (instant) followed by exponential decay: exp(-x*3).
Characteristics: Decay time ≈ 1.0 second (to 5% amplitude). Creates drum‑like or plucked sounds.
Use case: Turning modulation textures into percussive hits. Works well with Metallic Clash preset.
Formula: self * exp(-x*3)
Slow Fade
🌅 Gentle Exponential Decay
Effect: Very slow exponential decay: exp(-x*0.5).
Characteristics: Decay time ≈ 6 seconds (to 5% amplitude). Creates gradual fade‑outs.
Use case: Ambient textures that slowly disappear. Good with Gentle Chaos or Organic Swarm.
Formula: self * exp(-x*0.5)
Reverse
⏪ Time‑Reversed
Effect: Reverses the entire sound: self[duration - x].
Characteristics: Attack becomes decay, modulation evolution plays backwards.
Use case: Creating "backwards" effects, especially with envelopes that have strong attacks (like Percussive).
Formula: self[duration - x]
Gate
🚪 Rhythmic Gating
Effect: Square‑wave gating at 5 Hz (0.2 second period): on/off every 0.1 seconds.
Characteristics: Creates stuttering, rhythmic pattern. Like a tremolo with 100% depth.
Use case: Rhythmic textures, glitch effects. Works with any preset to add rhythmic interest.
Formula: self * if sin(2π*x/0.2) > 0 then 1 else 0 fi
Tremolo
🎵 Amplitude Modulation
Effect: Sine‑wave tremolo at 6 Hz with 50% depth: 1 - 0.5 + 0.5*sin(2π*6*x).
Characteristics: Smooth, periodic amplitude variation. More musical than Gate.
Use case: Adding "vibrato‑like" amplitude motion. Good with Harmonic Battle or Crystal Resonance.
Formula: self * (0.5 + 0.5*sin(2π*6*x))
Swell
🌊 Linear Fade‑In
Effect: Linear fade‑in over first 40% of duration, then sustain.
Characteristics: Slow attack, no decay. Creates "emerging" textures.
Use case: Sounds that appear from silence. Good for ambient entries.
Formula: self * if x < 0.4*duration then x/(0.4*duration) else 1 fi
ADSR
🎹 Classic Synth Envelope
Parameters:
- Attack: 0.05 s (fast)
- Decay: 0.2 s
- Sustain: 0.7 (70%)
- Release: 0.3 s
Effect: Classic synth envelope shape. Note: release starts at end of duration, so for short sounds you may not hear it.
Use case: Traditional synth‑like articulation. Works well with Alien Chorus for vocal‑like phrasing.
Formula: Complex conditional (see script)
Stutter
⏸️ Rapid On/Off Pattern
Effect: Very fast gating at 12 Hz: on/off every ~0.042 seconds.
Characteristics: Creates granular‑like texture, almost like bit‑crushing or sample‑rate reduction.
Use case: Extreme glitch effects, digital distortion. Best with Digital Warble or Glitchy Modulation.
Formula: self * if floor(x*12) mod 2 = 0 then 1 else 0 fi
Random Bursts
🎲 Stochastic Amplitude
Effect: Random amplitude jumps: 30% chance of full amplitude, otherwise 30% amplitude.
Characteristics: Creates unpredictable, bursty texture. Different each time (non‑deterministic).
Use case: Chaotic, noisy textures. Good with Quantum Entanglement for maximum unpredictability.
Formula: self * if randomUniform(0,1) < 0.3 then 1 else 0.3 fi
Spatial Modes
Mono
🔈 Single Channel
Processing: No stereo processing — keeps mono sound as is.
Effect: Centered, single‑channel output. Good for further processing or when stereo would be distracting.
Output name: competing_modulators_mono
Stereo Voices
🎧 Frequency‑Separated Channels
Processing:
- Left: Low‑pass filtered (<3 kHz), slightly attenuated (0.9×)
- Right: Band‑pass filtered (200‑6000 Hz), slightly attenuated (0.9×)
Effect: Creates sense of width by putting different frequency ranges in different channels. Not true stereo separation but effective.
Output name: competing_modulators_stereo
Rotating Modulators
🌀 Circular Panning Motion
Processing: Applies sine/cosine panning LFO at 0.08 Hz (12.5‑second period):
Effect: Sound appears to rotate slowly around listener. Creates immersive, 3D feeling.
Output name: competing_modulators_rotating
Binaural Chaos
🧠 Different Textures per Ear
Processing:
- Left: Warm texture (50‑3500 Hz), slow 0.15 Hz amplitude modulation
- Right: Bright texture (100‑5000 Hz), faster 0.25 Hz amplitude modulation
Effect: Each ear hears a differently filtered/modulated version, creating complex binaural interaction. Can produce phantom centers and width.
Output name: competing_modulators_binaural
Wide Field
🌐 Extreme Stereo Separation
Processing:
- Left: Very low‑pass filtered (0‑2000 Hz)
- Right: High‑pass filtered (300‑8000 Hz)
Effect: Bass frequencies in left ear, treble in right. Creates extreme width but can feel unnatural. Use sparingly.
Output name: competing_modulators_wide
Ping Pong War
🏓 Fast Alternating Panning
Processing: Fast (2.5 Hz) absolute‑value sine/cosine panning:
Effect: Sound jumps rapidly between left and right, creating aggressive "battle" feeling. Like modulators fighting for position.
Output name: competing_modulators_pingpong
Sonic Applications
Ambient Soundscapes
🌌 Evolving Backgrounds
Preset: Gentle Chaos or Cosmic Interference
Envelope: Slow Fade or Swell
Spatial: Rotating Modulators or Binaural Chaos
Duration: 30‑60 seconds
Processing: Add reverb (large hall), subtle pitch modulation, layer multiple instances at different base frequencies.
Result: Living, breathing atmospheric pads for films, games, or meditation.
Sci‑Fi Sound Design
Alien voices: Alien Chorus preset with ADSR envelope, moderate duration (3‑5 s). Pitch shift ±1 octave for different "characters".
Spaceship interiors: Mechanical Discord with Percussive envelope, short duration (1‑2 s), layered with low‑frequency rumble.
Quantum computers: Quantum Entanglement with Random Bursts, spatial Ping Pong War. Add bit‑crushing for digital edge.
Experimental Music
Glitch/IDM: Digital Warble or Glitchy Modulation with Stutter envelope. Chop into 0.1‑0.5 s segments, rearrange rhythmically.
Drone metal: Metallic Clash with no envelope, long duration, heavily distorted. Layer with guitar feedback.
Microtonal exploration: Set base frequency to non‑standard values (e.g., 137 Hz, 171 Hz) to explore non‑equal‑tempered harmonic conflicts.
Sound Effects Library
- Insect swarm: Organic Swarm, No envelope, 10 s, Binaural Chaos
- Underwater bubbles: Liquid Modulation, Percussive envelope (short), reverse some instances
- Wind through cracks: Gentle Chaos, Slow Fade, high‑pass filter >500 Hz
- Machine malfunction: Mechanical Discord, Random Bursts, Ping Pong War
- Metal stress: Metallic Clash, Swell envelope (long attack), low‑pass filter
- Electrical arcing: Crystal Resonance, Percussive (very short), add crackle sample
Generative Composition
Algorithmic approach: Script‑controlled parameter variation:
Result: Ever‑changing composition that explores the parameter space systematically.
Practical Workflow Examples
🎬 Film: "Abandoned Space Station"
Scene: Character enters derelict control room
Sound layers:
- Background hum: Gentle Chaos, Slow Fade, 60 s, Rotating Modulators
- Malfunctioning console: Mechanical Discord, Random Bursts, 8 s, Ping Pong War (sporadic)
- Alien presence: Alien Chorus, ADSR (short), 3 s, Binaural Chaos (occasional)
- Structural stress: Metallic Clash, Swell (long), 12 s, low‑passed
Mix: Layer with foley (footsteps, door creaks), reverb tail matching room size.
🎵 Track: "Quantum Dissonance" (Experimental)
Structure:
- Intro (0:00‑1:00): Gentle Chaos, Slow Fade, mono
- Build (1:00‑2:30): Harmonic Battle, Swell, Stereo Voices
- Climax (2:30‑3:30): Quantum Entanglement, Random Bursts, Ping Pong War
- Breakdown (3:30‑4:30): Liquid Modulation, Reverse, Binaural Chaos
- Outro (4:30‑5:30): Cosmic Interference, Slow Fade, Rotating Modulators
Processing: Add compression, side‑chain to kick drum, stereo widening.
Advanced Techniques & Customization
Modifying the Script
Adding new presets: Extend the if preset = ... section with new parameter sets and formula patterns.
Custom voice formulas: Replace the default voice patterns with your own FM expressions. Example:
Parameter Automation
Time‑varying parameters: Instead of constants, make parameters functions of time:
Combining with Other Techniques
Granular processing: Generate long texture, then use Praat's "Extract part" and "Concatenate" to create granular cloud.
Spectral processing: Convert to Spectrum, manipulate harmonics/partials, convert back to Sound.
Layering with samples: Mix competing modulators with recorded sounds (machinery, vocals, nature).
Troubleshooting
Cause: Extremely complex formula (many voices, nested functions, long duration)
Solution: Reduce number_voices, shorten duration, simplify formulas
Cause: Modulation_intensity too high (>0.9) causing extreme frequency deviation
Solution: Reduce modulation_intensity to 0.3‑0.7 range
Cause: Filtering in spatial modes causing phase cancellation when summed to mono
Solution: Use Mono mode for mono compatibility, or adjust filter slopes
Cause: Praat's randomUniform() may be seeded deterministically
Solution: Modify script to use time‑based seed, or accept deterministic "random"