Entropy-Modulated Dynamic Reverb — User Guide
Spectral intelligence reverb: analyzes signal complexity in real-time to dynamically control reverb characteristics, creating adaptive spatial effects that respond to audio content.
What this does
This script implements entropy-modulated dynamic reverb — an intelligent reverberation system that analyzes spectral complexity in real-time to control reverb characteristics. The system measures spectral entropy (information content) of the input signal and uses this measurement to dynamically blend between two contrasting reverb impulses: a dark reverb (long decay, heavy damping) for low-entropy signals and a bright reverb (short decay, light damping) for high-entropy signals. Additionally, the overall wet/dry mix is modulated by entropy, creating an adaptive spatial effect that responds to the audio's spectral characteristics.
Key Features:
- Spectral Entropy Analysis — Real-time measurement of signal complexity
- Dual Reverb System — Dark and bright reverb impulse responses
- Dynamic Modulation — Continuous parameter control based on entropy
- Adaptive Mixing — Wet/dry balance responds to signal content
- Matrix Processing — Fast, efficient signal mixing without loops
- Causal Smoothing — Exponential filtering prevents artifacts
Technical Implementation: (1) Spectral analysis: Convert sound to spectrogram, compute normalized spectral entropy for each frame. (2) Entropy smoothing: Apply causal exponential smoothing to prevent rapid fluctuations. (3) Impulse generation: Create two reverb impulses with contrasting characteristics. (4) Convolution: Process input with both reverb impulses. (5) Matrix mixing: Use fast matrix operations to blend dry signal, dark reverb, and bright reverb based on entropy values. Processing uses optimized Praat operations (Spectrogram, Matrix formulas) for speed and efficiency. Output preserves original dynamics while adding intelligent spatial enhancement.
Quick start
- In Praat, select exactly one Sound object.
- Run script… →
Entropy-Modulated_Reverb.praat. - Set analysis parameters (window size, hop size, smoothing).
- Adjust reverb characteristics for dark and bright reverbs.
- Set mix parameters (wet/dry range, mapping direction).
- Click OK — processing runs in 4 stages with progress updates.
- Output named "originalname_entropyReverb" appears in Objects window.
Spectral Entropy Theory
Information Theory Basics
Spectral Entropy Definition
Mathematical formulation:
Why Spectral Entropy for Reverb Control?
Perceptual correlates:
- Low entropy (0.0-0.3): Tonal, harmonic, predictable sounds
- Medium entropy (0.3-0.7): Mixed character, some noise + some tone
- High entropy (0.7-1.0): Noisy, transient-rich, unpredictable sounds
Reverb design rationale:
- Tonal sounds: Benefit from long, smooth reverb tails
- Noisy/transient sounds: Need shorter, brighter reverbs to avoid muddiness
- Mixed sounds: Balanced reverb characteristics work best
Reverb Impulse Design
Exponential Decay Model
Impulse response generation:
Why Dual Impulse Design?
Contrasting characteristics:
Dynamic Modulation System
Control Signal Generation
Real-time entropy tracking:
Why Exponential Smoothing?
Benefits for audio modulation:
- Prevents artifacts: Smooth transitions between states
- Causal processing: Only past information used (real-time compatible)
- Adjustable responsiveness: Alpha parameter controls reaction speed
- Computational efficiency: Simple recursive implementation
- Musical results: Natural-sounding modulation
🎚️ Modulation Intuition
Speech example:
Vowels (low entropy) → dark reverb dominates
Consonants (high entropy) → bright reverb dominates
Result: Clear speech with natural spatial enhancement
Music example:
Sustained notes (low entropy) → long, washy reverb
Percussion hits (high entropy) → short, crisp reverb
Result: Rhythmic clarity with atmospheric sustain
Matrix Mixing Architecture
Fast Signal Combination
Efficient implementation:
Why Matrix Processing?
Performance advantages:
- Vectorized operations: Entire signals processed simultaneously
- No sample loops: Eliminates interpreter overhead
- Memory efficiency: Single allocation for each signal
- Numerical stability: Consistent precision across entire signal
- Praat optimization: Leverages built-in matrix operations
Processing Pipeline
🔄 Four-Stage Processing Flow
Complete signal path from input to output:
Stage 1: Spectral Entropy Analysis
| Step | Operation | Output |
|---|---|---|
| 1.1 | Sound → Spectrogram | Time-frequency representation |
| 1.2 | Frame-by-frame FFT | Individual spectra |
| 1.3 | Power normalization | Probability distribution |
| 1.4 | Entropy calculation | Raw entropy values (0-1) |
| 1.5 | Store in TableOfReal | Time-entropy pairs |
Stage 2: Control Signal Conditioning
| Step | Operation | Output |
|---|---|---|
| 2.1 | Exponential smoothing | Smoothed entropy |
| 2.2 | Create IntensityTier | Continuous control signal |
| 2.3 | Interpolation | Sample-accurate modulation |
Stage 3: Reverb Generation
| Step | Operation | Output |
|---|---|---|
| 3.1 | Generate dark impulse | IR_dark (2.5s decay) |
| 3.2 | Generate bright impulse | IR_bright (1.0s decay) |
| 3.3 | Convolve input with IR_dark | Reverb_dark |
| 3.4 | Convolve input with IR_bright | Reverb_bright |
| 3.5 | Peak normalization | Prevent clipping |
Stage 4: Matrix-Based Mixing
| Step | Operation | Output |
|---|---|---|
| 4.1 | Create entropy sound | Control signal as audio |
| 4.2 | Length matching | All signals same duration |
| 4.3 | Convert to matrices | dry[], dark[], bright[], ent[] |
| 4.4 | Compute wet envelope | wet[] based on mapping |
| 4.5 | Final mix formula | output[] matrix |
| 4.6 | Matrix → Sound | Final output |
| 4.7 | Peak normalization | Safe playback level |
Complete Signal Flow
Computational Optimizations
- No progress updates in inner loops: Uses 'noprogress' for speed
- Matrix operations: Vectorized processing eliminates sample loops
- Efficient memory management: Intermediate objects cleaned up promptly
- Optimized FFT usage: Spectrogram provides efficient spectral analysis
- Causal processing: No look-ahead enables real-time implementation
Balance between computational efficiency and audio quality
Parameters Guide
⚙️ Complete Parameter Reference
Detailed explanation of all user-controllable parameters:
Analysis Parameters
| Parameter | Default | Range | Description |
|---|---|---|---|
| analysis_window_size | 0.025 | 0.01-0.05 | FFT window size in seconds |
| hop_size | 0.025 | 0.01-0.05 | Analysis frame hop size |
| smoothing_alpha | 0.15 | 0.05-0.5 | Exponential smoothing factor |
Reverb Parameters
| Parameter | Default | Range | Description |
|---|---|---|---|
| reverb_time_dark | 2.5 | 1.0-5.0 | Dark reverb decay time (seconds) |
| reverb_time_bright | 1.0 | 0.5-3.0 | Bright reverb decay time (seconds) |
| damping_dark | 0.8 | 0.1-1.0 | Dark reverb high-frequency damping |
| damping_bright | 0.3 | 0.1-1.0 | Bright reverb high-frequency damping |
Mix Parameters
| Parameter | Default | Range | Description |
|---|---|---|---|
| min_wet_amount | 0.1 | 0.0-0.5 | Minimum wet/dry mix ratio |
| max_wet_amount | 0.9 | 0.5-1.0 | Maximum wet/dry mix ratio |
| invert_mapping | 0 | 0/1 | Reverse entropy-to-wet mapping |
Parameter Interactions
- Window size vs hop size: Smaller values = higher temporal resolution
- Reverb time difference: Larger difference = more dramatic contrast
- Damping values: Higher = more high-frequency loss
- Wet amount range: Wider range = more dramatic mix changes
- Smoothing alpha: Higher = faster response to changes
Parameters work together to create the overall effect character
Recommended Settings
🎤 Vocal Processing
Goal: Clear vocals with adaptive spatial enhancement
Settings:
- Window: 20ms, Hop: 20ms
- Smoothing: 0.2 (responsive)
- Dark reverb: 3.0s, Damping 0.7
- Bright reverb: 1.2s, Damping 0.4
- Wet range: 0.2-0.6
- Mapping: Normal (0)
🥁 Drum Processing
Goal: Rhythmic clarity with atmospheric tails
Settings:
- Window: 15ms, Hop: 15ms
- Smoothing: 0.1 (gradual)
- Dark reverb: 2.0s, Damping 0.9
- Bright reverb: 0.8s, Damping 0.2
- Wet range: 0.3-0.7
- Mapping: Normal (0)
🎹 Dialogue Enhancement
Goal: Intelligible speech with controlled space
Settings:
- Window: 25ms, Hop: 25ms
- Smoothing: 0.25 (responsive)
- Dark reverb: 1.5s, Damping 0.6
- Bright reverb: 0.5s, Damping 0.4
- Wet range: 0.1-0.4
- Mapping: Inverted (1)
Applications
Music Production
Use case: Intelligent reverb that adapts to musical content
Technique: Use moderate wet levels with contrasting reverb times
Example: Vocal tracks where sustained notes get lush reverb but consonants remain clear
Sound Design
Use case: Creating evolving spatial textures
Technique: Extreme parameter settings for dramatic effects
Example: Transform dry samples into dynamically spatialized sounds
Dialogue Processing
Use case: Adding space to speech while maintaining intelligibility
Technique: Inverted mapping with conservative wet levels
Example: Film dialogue where room tone is added but sibilants remain clean
Algorithmic Composition
Use case: Automated spatialization of generated material
Technique: Process algorithmically generated sounds
Example: L-system generated patterns with intelligent reverb application
Advanced Techniques
- Serial processing: Apply multiple times with different settings
- Section processing: Different parameters for different song sections
- Hybrid approaches: Combine with other DSP effects
- Automation: Vary parameters over time for evolving spaces
Entropy modulation can be integrated into complex production workflows
Troubleshooting Common Issues
Cause: Long audio files, small window sizes, many FFT calculations
Solution: Use larger window/hop sizes, process shorter segments
Cause: Too much smoothing (low alpha), large hop size
Solution: Increase smoothing_alpha, decrease hop_size
Cause: Dark reverb too dominant, excessive reverb times
Solution: Reduce reverb_time_dark, increase damping_dark
Cause: Extreme wet/dry settings, hot input signal
Solution: Adjust min/max_wet_amount, normalize input first
Technical Deep Dive
Spectral Analysis Mathematics
Entropy Calculation Details
Implementation specifics:
Reverb Impulse Physics
Exponential Decay Modeling
Physical interpretation: