Wave Interference Pattern — User Guide
Spectral interference processing: applies mathematical wave interference patterns directly to frequency domain data using matrix operations, creating complex comb filtering, phasing, and spectral modulation effects with real-time performance.
What this does
This script implements spectral wave interference processing — a novel approach that applies mathematical interference patterns directly to audio spectra using fast matrix operations. Unlike traditional time-domain effects, this works in the frequency domain to create complex comb filtering, spectral notching, and phasing effects that would be computationally prohibitive in the time domain. The process involves: (1) Frequency domain conversion: Transform audio to spectrum using FFT. (2) Matrix representation: Convert spectrum to matrix for mathematical manipulation. (3) Interference application: Apply sine/cosine wave patterns to create spectral modulation. (4) Frequency-dependent processing: Limit effects to specified frequency range with brightness compensation. (5) Efficient reconstruction: Convert back to audio with proper timing preservation.
Key Features:
- Matrix Processing — Real-time spectral manipulation
- Wave Interference — Sine/cosine pattern generation
- 4 Factory Presets — From subtle to extreme effects
- Frequency Limiting — Controlled spectral range
- Brightness Compensation — Prevents high-frequency loss
- Instant Processing — Optimized matrix mathematics
Technical Implementation: (1) Spectral conversion: Use Praat's FFT to convert time-domain audio to frequency-domain spectrum. (2) Matrix conversion: Transform spectrum to matrix representation for mathematical operations. (3) Interference formula: Apply |sin(col/A) + weight×cos(col/B)| pattern to spectral magnitudes. (4) Frequency limiting: Only process frequencies below cutoff to prevent aliasing artifacts. (5) Brightness compensation: Apply high-frequency boost to counteract spectral darkening. (6) Signal reconstruction: Convert matrix back to spectrum, then to audio, with proper sample rate and duration correction. Processing is nearly instantaneous due to optimized matrix mathematics.
Quick start
- In Praat, select exactly one Sound object.
- Run script… →
wave_interference_pattern.praat. - Choose Preset from dropdown:
- Default: Balanced interference effect
- Strong Interference: Pronounced comb filtering
- Subtle Interference: Gentle spectral modulation
- Alien Radio: Extreme metallic transformation
- Phaser: Smooth phase-shift effects
- Or select Custom and adjust:
- Frequency_cutoff_hz: Maximum affected frequency
- Sine_divisor: Sine wave pattern density
- Cosine_divisor: Cosine wave pattern density
- Cosine_weight: Cosine pattern intensity
- Brightness_compensation: High-frequency boost
- Set Scale_peak (0.99 recommended)
- Enable Play_after_processing for immediate audition
- Enable Keep_original to preserve source
- Click OK — processed sound created with "_Interference" suffix
Interference Theory
Wave Interference Fundamentals
Physical Interference Phenomena
Acoustic wave interference:
Spectral vs Temporal Processing
Domain comparison:
🎛️ Processing Domain Differences
Time Domain Processing (Traditional):
- Operations: Waveform manipulation, filtering, modulation
- Effects: EQ, compression, distortion, chorus, flanger
- Advantages: Intuitive, preserves phase relationships
- Limitations: Computationally expensive for complex spectral effects
Frequency Domain Processing (This Script):
- Operations: Spectral magnitude manipulation, pattern application
- Effects: Comb filtering, spectral notching, alien transformations
- Advantages: Extremely fast, precise frequency control
- Limitations: Phase relationships may be affected
Our Hybrid Approach: Convert to frequency domain, apply patterns, convert back with timing correction
Interference Mathematics
Core Interference Formula
Spectral pattern generation:
Pattern Visualization
Simple Sine Pattern (cosine_weight=0):
|sin(col/800)| pattern:
Peaks at: col=400, 1200, 2000...
Nulls at: col=800, 1600, 2400...
Combined Pattern (cosine_weight=0.5):
|sin(col/800) + 0.5×cos(col/1200)|:
Complex peaks at irregular intervals
Richer, more musical interference
Alien Pattern (cosine_weight=0.9):
|sin(col/150) + 0.9×cos(col/160)|:
Very dense, metallic character
Extreme spectral modulation
Each pattern creates unique sonic character
Frequency Domain Considerations
Bin-Based Processing
Spectral resolution:
Brightness Compensation
Spectral tilt correction:
Problem: Spectral processing often reduces high frequencies
Interference patterns can create "muffled" or "dark" results
Solution: Apply frequency-dependent gain boost
Formula: gain = 1 + (col/total_bins) × (brightness - 1)
How it works:
- Low frequencies: minimal boost (×1.0)
- Mid frequencies: moderate boost
- High frequencies: maximum boost (×brightness)
Examples:
brightness=1.2: 20% high-frequency boost
brightness=1.5: 50% high-frequency boost
brightness=2.0: 100% high-frequency boost
Result: Preserves high-frequency content and clarity
Matrix Processing Algorithm
Spectral Conversion Pipeline
FFT Processing Chain
Domain transformation steps:
Matrix Formula Construction
Dynamic formula generation:
Timing and Reconstruction
FFT Artifact Management
Common FFT issues and solutions:
Problem 1: Incorrect Sample Rate
FFT reconstruction may use wrong sampling rate
Solution: Override sampling frequency: original_sr
Problem 2: Duration Padding
FFT adds zeros to reach power-of-two length
Solution: Extract part: 0, original_dur
Problem 3: Phase Distortion
Magnitude-only processing affects phase relationships
Solution: Use rectangular window for extraction
Problem 4: Time Smearing
FFT windowing can blur transients
Solution: Fast FFT with minimal windowing
Our Approach: Balance between speed and quality
Fast processing for experimentation
Adequate quality for most musical applications
Performance Optimization
Matrix processing advantages:
Complete Processing Pipeline
Pattern Presets
Default
| Parameter | Value | Sonic Character |
|---|---|---|
| Sine_divisor | 800 | Medium pattern density |
| Cosine_divisor | 1200 | Secondary complexity |
| Cosine_weight | 0.5 | Balanced pattern mix |
| Brightness_compensation | 1.2 | Moderate high-frequency boost |
| Effect | Balanced | Musical comb filtering |
🎵 Default Characteristics
Sonic character: Balanced comb filtering with musical spectral modulation
Best for: General purpose, vocals, instruments, full mixes
Technical notes: Medium pattern density creates audible but not overwhelming effects, balanced cosine contribution adds complexity without extreme transformation, moderate brightness compensation maintains clarity
Strong Interference
| Parameter | Value | Sonic Character |
|---|---|---|
| Sine_divisor | 400 | Dense pattern |
| Cosine_divisor | 600 | Complex secondary |
| Cosine_weight | 0.8 | Strong cosine influence |
| Brightness_compensation | 1.5 | Significant high-frequency boost |
| Effect | Pronounced | Obvious spectral notching |
🎛️ Strong Interference Characteristics
Sonic character: Pronounced comb filtering with obvious spectral peaks and nulls
Best for: Sound design, dramatic effects, electronic music
Technical notes: Dense patterns create closely spaced spectral notches, strong cosine weight adds complex modulation, significant brightness compensation counters the strong filtering effect
Subtle Interference
| Parameter | Value | Sonic Character |
|---|---|---|
| Sine_divisor | 1200 | Sparse pattern |
| Cosine_divisor | 2000 | Very subtle secondary |
| Cosine_weight | 0.2 | Minimal cosine influence |
| Brightness_compensation | 1.1 | Very gentle high-frequency boost |
| Effect | Subtle | Gentle spectral shaping |
🎚️ Subtle Interference Characteristics
Sonic character: Gentle spectral modulation that enhances without overwhelming
Best for: Subtle enhancement, acoustic instruments, vocals, mastering
Technical notes: Sparse patterns create broad, gentle spectral shaping, minimal cosine contribution maintains transparency, very gentle brightness compensation preserves natural character
Alien Radio
| Parameter | Value | Sonic Character |
|---|---|---|
| Sine_divisor | 150 | Extremely dense pattern |
| Cosine_divisor | 160 | Similar dense secondary |
| Cosine_weight | 0.9 | Very strong cosine influence |
| Brightness_compensation | 2.0 | Maximum high-frequency boost |
| Effect | Extreme | Metallic, robotic transformation |
Phaser
| Parameter | Value | Sonic Character |
|---|---|---|
| Sine_divisor | 2000 | Very sparse pattern |
| Cosine_divisor | 2005 | Slightly different secondary |
| Cosine_weight | 1.0 | Equal cosine influence |
| Brightness_compensation | 1.0 | No high-frequency boost |
| Effect | Smooth | Phase-shift like modulation |
- Default: All-purpose musical interference
- Strong Interference: Dramatic comb filtering effects
- Subtle Interference: Gentle spectral enhancement
- Alien Radio: Extreme metallic transformation
- Phaser: Smooth phase-shift style effects
Parameters & Settings
Interference Parameters
| Parameter | Range | Default | Description |
|---|---|---|---|
| Frequency_cutoff_hz | 100-20000 | 11000 | Maximum affected frequency |
| Sine_divisor | 50-5000 | 800 | Sine pattern density |
| Cosine_divisor | 50-5000 | 1200 | Cosine pattern density |
| Cosine_weight | 0.0-2.0 | 0.5 | Cosine pattern intensity |
Tone Parameters
| Parameter | Range | Default | Description |
|---|---|---|---|
| Brightness_compensation | 0.5-3.0 | 1.2 | High-frequency boost amount |
Output Parameters
| Parameter | Range | Default | Description |
|---|---|---|---|
| Scale_peak | 0.1-1.0 | 0.99 | Final peak normalization |
| Play_after_processing | boolean | 1 | Auto-play after processing |
| Keep_original | boolean | 1 | Preserve source sound |
Parameter Guidance
- Similar divisors (800/850): Creates beating patterns
- Very different divisors (200/2000): Creates complex multi-scale patterns
- Very small divisors (50-200): Creates dense, metallic effects
- Large divisors (1000-5000): Creates broad, gentle shaping
- Prime number ratios: Creates non-repeating, complex patterns
- 0.0: Pure sine pattern (simple comb filtering)
- 0.2-0.5: Balanced complexity (musical)
- 0.6-0.8: Strong cosine influence (rich patterns)
- 0.9-1.0+: Dominant cosine (extreme transformation)
- 1000-3000Hz: Focus on vocal/formant range 3000-8000Hz: Focus on presence and clarity
- 8000-12000Hz: Focus on brightness and air
- 12000-20000Hz: Full spectrum processing
- <5000Hz: Extreme low-frequency focus
Applications
Sound Design
Use case: Creating metallic, robotic, or alien sounds
Technique: Use Alien Radio preset with various sources
Results: Extreme spectral transformation, metallic resonances, sci-fi effects
Vocal Processing
Use case: Adding character and presence to vocals
Technique: Use Subtle Interference or Phaser presets
Benefits: Gentle formant enhancement, added presence, vintage character
Drum Enhancement
Use case: Adding punch and character to drums
Technique: Use Strong Interference on drum buses
Results: Enhanced attack, added ring and sustain, punchy character
Creative Effects
Use case: Experimental and textural processing
Technique: Extreme parameter settings with various sources
Results: Unique spectral textures, experimental sounds, audio art
Practical Workflow Examples
🎤 Vocal Presence Enhancement
Goal: Add character and presence to vocal recordings
Setup:
- Preset: Subtle Interference or Phaser
- Source: Lead vocal recording
- Adjustment: Lower Frequency_cutoff_hz to 5000-8000Hz
- Result: Enhanced vocal presence with vintage character
Tip: Blend with dry signal for subtle enhancement
🥁 Drum Texture Creation
Goal: Add metallic ring and sustain to drums
Setup:
- Preset: Strong Interference or Alien Radio
- Source: Drum bus or individual drums
- Adjustment: Use parallel processing for controlled effect
- Result: Punchy drums with enhanced character
Tip: Lower Cosine_weight for more predictable results
🎹 Synthetic Texture Generation
Goal: Create evolving synthetic textures
Setup:
- Preset: Alien Radio with extreme settings
- Source: Simple synth pads or noise
- Adjustment: Experiment with prime number divisors
- Result: Complex, evolving synthetic textures
Tip: Process multiple times with different settings
Advanced Techniques
- Stage 1: Subtle Interference for gentle shaping
- Stage 2: Strong Interference for pronounced effects
- Stage 3: Alien Radio for extreme transformation
- Result: Complex, layered spectral character
- Low cutoffs (1000-3000Hz): Formant and vocal range effects
- Medium cutoffs (3000-8000Hz): Presence and clarity enhancement
- High cutoffs (8000-20000Hz): Air and brightness effects
- Multiple passes: Different cutoffs for different frequency ranges
Troubleshooting Common Issues
Cause: Insufficient brightness compensation or too low frequency cutoff
Solution: Increase Brightness_compensation, raise Frequency_cutoff_hz, or use presets with higher brightness
Cause: Very small divisor values or very high cosine weight
Solution: Increase divisor values, reduce cosine weight, or lower frequency cutoff
Cause: Too high divisor values or too low frequency cutoff
Solution: Decrease divisor values, raise frequency cutoff, or increase cosine weight
Cause: Very similar divisor values creating beating patterns
Solution: Use more different divisor values or reduce cosine weight
Algorithmic Extensions
Advanced Interference Patterns
Complex Pattern Generation
Beyond basic sine/cosine:
Time-Varying Interference
Dynamic Spectral Processing
Evolving patterns over time:
Phase-Aware Processing
Complex Spectrum Manipulation
Beyond magnitude-only processing: