XMod — Cross Modulation Plugin User Guide
Advanced audio modulation: ring modulation, amplitude modulation, and rhythmic gating for creative sound design and effects processing.
What this does
This script implements cross modulation — a collection of audio modulation techniques for creative sound processing. Three primary modulation types: (1) Ring Modulation: Multiplies carrier signal with modulator, creating sum/difference frequencies (metallic, bell-like tones). (2) Amplitude Modulation (AM): Classic tremolo/radio-style modulation where modulator controls carrier amplitude. (3) Rhythmic Gate: Rhythmic amplitude gating with adjustable attack/release and duty cycle for stutter, pulse, and sidechain effects. Multiple modulator sources: internal oscillators (sine, square, triangle, sawtooth) or external audio files. Real-time modulator visualization, 9 built-in presets, and comprehensive parameter control.
Key Features:
- Three Modulation Types — Ring mod, AM, rhythmic gate
- 9 Built-in Presets — From metallic ring mod to sidechain compression
- Multiple Modulator Sources — 4 oscillator types + external audio
- Visual Preview — Draws modulator waveform before processing
- Gate Envelope Control — Adjustable attack/release and duty cycle
- Frequency/Depth Control — Precise modulation parameter tuning
Technical Implementation: (1) Carrier selection: Primary audio to be modulated. (2) Modulator generation: Create modulator signal via oscillator or load external audio. (3) Signal multiplication: Apply modulation formula based on type. (4) Envelope shaping: For rhythmic gate, apply attack/release smoothing. (5) Output normalization: Scale output to prevent clipping. Processing methods: Sample-by-sample multiplication with optional chunking for long files. Modulator visualization uses Praat's drawing capabilities. External modulator audio automatically trimmed/padded to match carrier duration.
Quick start
- In Praat, select one Sound object (or two for external modulator).
- Run script… →
XMod_Cross_Modulation.praat. - Choose Preset or select "Custom" for manual control.
- Select Mod_type: Ring Modulation, Amplitude Modulation, or Rhythmic Gate.
- Choose Mod_source: Oscillator type or "Second Sound".
- Set Mod_frequency (Hz) and Mod_depth (0-1 for AM/Gate, any for Ring).
- For Rhythmic Gate: adjust Attack, Release (ms), and Duty_cycle.
- Enable Draw_modulator to visualize modulator waveform.
- Click OK — modulation applied, result named "originalname_xmod".
Modulation Theory
Ring Modulation
📡 Frequency Shifting
Formula: Output = Carrier × Modulator
Mathematical basis: sin(ω₁t) × sin(ω₂t) = ½[cos((ω₁-ω₂)t) - cos((ω₁+ω₂)t)]
Effect: Creates sum and difference frequencies, eliminates original frequencies
Character: Metallic, bell-like, inharmonic, robotic
Amplitude Modulation (AM)
📻 Classic Tremolo
Formula: Output = Carrier × (1 + Depth × Modulator) / 2
Mathematical basis: A[1 + m·cos(ωₘt)]·cos(ωₖt) where m = modulation index
Effect: Varies amplitude at modulator frequency
Character: Vibrato/tremolo, radio effect, underwater
Rhythmic Gate
⏱️ Rhythmic Amplitude Control
Formula: Output = Carrier × Gate_Envelope
Process: Convert modulator to gate envelope with attack/release smoothing
Effect: Rhythmic amplitude gating (stutter, pulse, sidechain)
Character: Chopped, pulsed, rhythmic, pumping
Modulator Sources
Complete Processing Pipeline
Modulation Types
Type 1: Ring Modulation
🔔 Frequency Multiplication
Formula: Output = Carrier × Modulator
Effect: Creates sum/difference frequencies, metallic tones
Depth interpretation: Any value, 1.0 = full multiplication
Best for: Sci-fi effects, metallic textures, bell-like tones
Parameter ranges:
- Frequency: 1 Hz to 5000 Hz (typically 20-2000 Hz)
- Depth: 0.0 to any value (typically 0.5-2.0)
- Source: Any oscillator or external audio
Type 2: Amplitude Modulation (AM)
📻 Classic Tremolo
Formula: Output = Carrier × (1 + Depth × Modulator) / 2
Effect: Amplitude variation at modulator frequency
Depth interpretation: 0-1, proportion of amplitude variation
Best for: Tremolo, vibrato, radio effects, underwater sounds
Parameter ranges:
- Frequency: 0.1 Hz to 50 Hz (typically 1-20 Hz)
- Depth: 0.0 to 1.0 (0 = no effect, 1 = full modulation)
- Source: Sine (smooth) or square (hard) recommended
Type 3: Rhythmic Gate
⏱️ Rhythmic Chopping
Formula: Output = Carrier × Gate_Envelope
Effect: Rhythmic amplitude gating with smoothing
Additional parameters: Attack, release, duty cycle
Best for: Stutter effects, sidechain pumping, rhythmic patterns
Parameter ranges:
- Frequency: 0.5 Hz to 50 Hz (typically 1-20 Hz)
- Depth: 0.0 to 1.0 (proportion of gating effect)
- Duty cycle: 0.1 to 0.9 (ON time proportion)
- Attack/Release: 1 ms to 500 ms (typically 5-100 ms)
- Source: Square wave recommended
Built-in Presets
Ring Modulation Presets
| Preset | Parameters | Character | Use Case |
|---|---|---|---|
| Ring Mod - Metallic | Sine, 440 Hz, depth 1.0 | Classic metallic ring mod | Sci-fi effects, robot voices |
| Ring Mod - Deep | Sine, 80 Hz, depth 1.0 | Low frequency ring mod | Subharmonic generation, drones |
Amplitude Modulation Presets
| Preset | Parameters | Character | Use Case |
|---|---|---|---|
| AM - Radio Style | Sine, 1000 Hz, depth 0.8 | High frequency tremolo | Vintage radio effect |
| AM - Tremolo | Sine, 6 Hz, depth 0.7 | Musical tremolo | Guitar amp tremolo, vibrato |
Rhythmic Gate Presets
| Preset | Parameters | Character | Use Case |
|---|---|---|---|
| Gate - Fast Stutter | Square, 10 Hz, duty 0.5, A/R 2 ms | Fast rhythmic chopping | Glitch effects, stutter edits |
| Gate - Slow Pulse | Square, 2 Hz, duty 0.5, A/R 10 ms | Slow rhythmic pulse | Ambient pulsing, background rhythm |
| Gate - Helicopter | Square, 12.5 Hz, duty 0.5, A/R 1 ms | Medium-fast chopping | Helicopter effect, mechanical rhythm |
| Sidechain Style | Square, 2 Hz, duty 0.3, A/R 5/80 ms | Sidechain pumping | EDM-style sidechain compression |
Parameter Reference
| Parameter | Type | Default | Description |
|---|---|---|---|
| Preset | option | Custom | 9 built-in presets or custom |
| Mod_type | option | Ring Modulation | Ring, AM, or Rhythmic Gate |
| Mod_source | option | Sine Oscillator | 4 oscillators or external audio |
| Mod_frequency | positive | 10 | Modulator frequency in Hz |
| Mod_depth | real | 1.0 | Modulation depth (0-1 for AM/Gate) |
| Attack | positive | 5 | Gate attack time in milliseconds |
| Release | positive | 5 | Gate release time in milliseconds |
| Duty_cycle | positive | 0.5 | Gate ON time proportion (0-1) |
| Draw_modulator | boolean | 1 | Visual preview of modulator |
| Play_result | boolean | 1 | Auto-play after processing |
Applications
Sound Design & Effects
Use case: Transform ordinary sounds into special effects
Techniques:
- Sci-fi robots: Ring mod with 50-200 Hz sine on voice
- Underwater sounds: AM with 5-10 Hz sine on any sound
- Helicopter effects: Gate with 10-15 Hz square on engine noise
- Radio transmission: AM with 800-1200 Hz sine on voice
- Stutter edits: Gate with 8-12 Hz square on musical phrases
Music Production
Use case: Add movement and interest to tracks
Techniques:
- Sidechain pumping: Gate with 2-4 Hz, duty 0.3, long release
- Tremolo guitars: AM with 4-8 Hz sine on guitar tracks
- Rhythmic pads: Gate with musical frequencies (e.g., 1.5 Hz = 90 BPM)
- Metallic textures: Ring mod with harmonic frequencies on synth pads
- Glitch effects: Fast gate (10-20 Hz) with short attack/release
Experimental Composition
Use case: Create evolving textures and complex modulations
Techniques:
- External audio modulation: Use environmental sounds as modulators
- Frequency sweeps: Automate modulator frequency changes
- Complex gating: Use rhythmic audio (drums) as gate modulator
- Layered modulation: Apply multiple modulation types sequentially
Audio Restoration & Creative Masking
Use case: Mask imperfections or create intentional artifacts
Techniques:
- Noise masking: AM to mask background noise with musical modulation
- Artistic degradation: Ring mod to intentionally "damage" clean recordings
- Rhythmic masking: Gate to hide inconsistent background sounds
Practical Workflow Examples
🎬 Sci-Fi Robot Voice (Film)
Goal: Create robotic, metallic voice effect
Settings:
- Type: Ring Modulation
- Preset: Ring Mod - Metallic
- Source: Sine oscillator
- Frequency: 80-120 Hz (adjust to voice pitch)
- Depth: 0.7-0.9
Result: Metallic, robotic voice with inharmonic overtones
🎵 EDM Sidechain Pumping (Music)
Goal: Create sidechain compression effect on pads/bass
Settings:
- Type: Rhythmic Gate
- Preset: Sidechain Style
- Source: Square oscillator
- Frequency: Match track BPM (e.g., 2 Hz = 120 BPM)
- Duty: 0.2-0.3 (short ON time)
- Attack: 5 ms, Release: 50-100 ms
- Depth: 0.8-0.9
Result: Pumping rhythm that ducks with kick drum
🎨 Glitch/Stutter Effects (Experimental)
Goal: Create digital glitch/stutter effects
Settings:
- Type: Rhythmic Gate
- Preset: Gate - Fast Stutter
- Source: Square oscillator
- Frequency: 8-15 Hz (adjust to taste)
- Duty: 0.3-0.7 (experiment)
- Attack/Release: 1-5 ms (very short)
- Depth: 1.0
Result: Digital chopping/stuttering effect
Advanced Techniques
- BPM to Hz: BPM ÷ 60 = Hz (e.g., 120 BPM = 2 Hz)
- Musical ring mod: Set modulator to musical interval (e.g., 440 Hz × 1.5 = 660 Hz = perfect fifth)
- Harmonic AM: Use modulator frequencies that are harmonics of carrier fundamentals
- Polyrhythmic gating: Use non-integer frequencies (e.g., 1.333 Hz against 2 Hz)
- Drum loops: Create rhythmic gating synchronized to drums
- Voice modulation: Use one voice to modulate another
- Environmental sounds: Use nature sounds for organic modulation
- Melodic modulation: Use melodic content as modulator for harmonic interaction
Troubleshooting Common Issues
Cause: Modulator has zero or near-zero values, depth too low
Solution: Increase depth, check modulator visualization, use different source
Cause: Depth > 1.0 for AM/Gate, or ring mod creating large amplitudes
Solution: Reduce depth, use external modulator normalization
Cause: Attack/release too short for frequency
Solution: Increase attack/release (minimum 5 ms for > 10 Hz)
Cause: Modulator frequency creating dissonant sum/difference frequencies
Solution: Adjust frequency to musical intervals, reduce depth
Cause: Selected wrong number of sounds for external modulator
Solution: For external modulator: select carrier first, modulator second (2 total)