Phantom Bass Enhancer + Haas Stereo Widener — User Guide
Psychoacoustic bass enhancement through harmonic generation combined with spatial widening using Haas effect and mid-side processing.
What this does
This script implements psychoacoustic bass enhancement combined with stereo spatial widening. It creates the perception of deep bass on systems with limited low-frequency response (small speakers, headphones) by generating harmonic overtones that trick the ear into "hearing" missing fundamentals. Simultaneously, it applies stereo enhancement using both the Haas (precedence) effect and mid-side processing to create a wider, more immersive soundstage.
Key Features:
- Phantom Bass: Waveshaping generates real harmonics from extracted bass content
- Smart Filtering: Original bass removed via high-pass, harmonics band-limited for clarity
- Haas Effect: Delays one channel slightly to create spaciousness
- Mid-Side Processing: Adjustable stereo width via side signal manipulation
- Mono Compatibility: Optional safety mode minimizes phase cancellation
- Peak Protection: Multiple normalization passes prevent clipping
- 6 Presets: From subtle enhancement to aggressive MaxxBass-style effects
- Extracts bass frequencies (30-120 Hz typical)
- Generates harmonics via waveshaping distortion (tanh function)
- Filters original audio to remove deep bass
- Mixes harmonics back in, creating perception of strong bass
Result: Audio appears to have more powerful bass without actually boosting low frequencies that small speakers can't reproduce.
Technical Implementation: (1) Stereo preparation: Converts mono to stereo if needed. (2) Bass extraction: Bandpass filters each channel for low frequencies. (3) Harmonic generation: Applies tanh(x·drive) waveshaping to create harmonics, then bandpass filters to desired brightness range. (4) Original filtering: High-passes original to remove conflicting bass. (5) Mixing: Combines filtered original with harmonics at controlled mix level. (6) Haas effect: Delays one channel slightly (±15ms typical). (7) Mid-side widening: Extracts mid/side components, boosts side signal. (8) Safety features: Multiple peak detection passes, mono compatibility controls. (9) Preset system: 6 carefully tuned starting points.
Quick start
- In Praat, select exactly one Sound object (mono or stereo).
- Run script… →
phantom_bass_haas_widener.praat. - Choose preset (6 options):
- Custom (use manual settings)
- Subtle Enhancement (gentle)
- Moderate Effect (balanced)
- Aggressive MaxxBass Style (strong)
- Mono-Safe Widening (broadcast safe)
- Wide Stereo (not mono-safe)
- Adjust Phantom Bass parameters if using Custom preset:
bass_low_freq,bass_high_freq: Bass extraction rangedrive: Harmonic generation intensity (0.1-10)harmonic_mix: Dry/wet blend (0-1)highpass_freq: Original bass removal cutoffharmonic_lowpass: Harmonic brightness control
- Set Haas Effect options (enable/disable, delay, mix, level difference).
- Set Mid-Side Widening options (enable/disable, stereo width).
- Enable preserve_mono_compatibility for broadcast/safe use.
- Enable play_result to auto-play output.
- Click OK — processing applied, output named "originalname_phantom_haas".
drive values (>5) create strong distortion — use judiciously. Removing too much original bass (highpass_freq >150 Hz) can make audio sound thin — balance with harmonic mix.
Psychoacoustic Theory
The Missing Fundamental Phenomenon
👂 How We "Hear" Phantom Bass
Scientific basis: When a complex tone contains harmonics at frequencies f, 2f, 3f, 4f... the auditory system often perceives a fundamental frequency f even if it's physically absent.
Physical limitation: Speaker can't reproduce 100 Hz effectively
Perceptual trick: Generate harmonics at 200 Hz, 300 Hz, 400 Hz...
Brain interprets: "There must be a 100 Hz fundamental"
Result: Perception of deep bass without actual low frequencies
Practical application: Extract bass frequencies (30-120 Hz) → Generate harmonics (120-800 Hz) → Remove original bass → Brain fills in the "missing" low end.
Haas (Precedence) Effect
🎧 Creating Spatial Width with Time Differences
Discovery: Helmut Haas (1949) found that when two identical sounds arrive within 1-30ms of each other, we perceive a single sound located at the first arriving source.
Mono compatibility issue: When L and R are summed to mono:
Mid-Side Processing
🎚️ Stereo Width Control
Concept: Any stereo signal can be represented as Mid (mono-compatible) and Side (stereo-difference) components:
Mono compatibility: When collapsed to mono:
Phantom Bass Enhancement
Stage 1: Bass Extraction
🔊 Isolating Low Frequencies
Bandpass filtering: Extract only the frequency range that will generate harmonics
| Parameter | Typical Range | Effect | Recommendation |
|---|---|---|---|
| bass_low_freq | 20-60 Hz | Lowest frequency extracted | 30 Hz for most music, 40 Hz for speech |
| bass_high_freq | 80-150 Hz | Highest frequency extracted | 120 Hz balances harmonic generation |
Design rationale: Extract only frequencies that benefit from harmonic generation. Too low (<30Hz) may not generate audible harmonics. Too high (>150Hz) may conflict with existing midrange.
Stage 2: Harmonic Generation via Waveshaping
Stage 3: Harmonic Filtering
| Parameter | Typical Range | Sonic Character |
|---|---|---|
| harmonic_lowpass = 400 Hz | 400-600 Hz | Warm, subtle harmonics |
| harmonic_lowpass = 800 Hz | 700-900 Hz | Balanced, natural |
| harmonic_lowpass = 1200 Hz | 1000-1500 Hz | Bright, pronounced |
| harmonic_lowpass = 2000 Hz | 1500-2500 Hz | Aggressive, distorted |
Filter implementation:
Stage 4: Original High-Pass Filtering
- Purpose: Prevent original bass from masking generated harmonics
- Without this: Bass becomes boomy/muddy, harmonics less effective
- Parameter:
highpass_freqtypically 80-120 Hz - Rule: Should be near or slightly below
bass_high_freq
Common mistake: Setting highpass_freq too high (>150Hz) removes too much body from audio, making it sound thin.
Stage 5: Harmonic Mixing
Parameter Interactions
Warm, subtle bass: bass_low_freq=40, bass_high_freq=100 drive=2.0, harmonic_mix=0.4 highpass_freq=90, harmonic_lowpass=500 Result: Gentle fullness
Aggressive modern bass: bass_low_freq=30, bass_high_freq=120 drive=5.0, harmonic_mix=0.8 highpass_freq=120, harmonic_lowpass=1000 Result: Pronounced "hyperreal" bass
Speech/clarity focused: bass_low_freq=60, bass_high_freq=150 drive=1.5, harmonic_mix=0.3 highpass_freq=120, harmonic_lowpass=400 Result: Vocal presence without boominess
Haas Effect Implementation
Basic Haas Algorithm
⏱️ Channel Delay Technique
Standard implementation: Delay one channel slightly relative to the other
Why usually delay right channel? Convention, not requirement. Can swap L/R for different spatial effects.
Haas Parameters
| Parameter | Range | Effect | Mono-Safe Limits |
|---|---|---|---|
| haas_delay_ms | 1-50 ms | Delay time; longer = wider but risk echo | ≤12 ms |
| haas_mix | 0.0-1.0 | Wet/dry balance; higher = stronger effect | ≤0.25 |
| level_difference_db | -6 to +6 dB | Delayed channel level relative to original | -3 to 0 dB |
Mono Compatibility Issues
⚠️ Phase Cancellation Problem
What happens in mono? Left and right channels sum:
Safety mode implementation:
Practical Haas Guidelines
- Headphones only: 15-30ms delay, 0.4-0.7 mix
- Stereo speakers: 10-20ms delay, 0.3-0.5 mix
- Broadcast/streaming: 5-12ms delay, 0.1-0.25 mix (with safety mode)
- Club/PA systems: Avoid or use ≤5ms with safety mode
- Music production: 10-20ms delay, automate mix for effect
When to avoid Haas:
- Material that will definitely be played in mono
- Vocals or center-panned elements (can cause "phasiness")
- Already wide stereo mixes (can become exaggerated)
- Material with strong transients (can blur timing)
Mid-Side Widening
M/S Encoding/Decoding
🎛️ Stereo Representation
Mid (M) and Side (S) components:
Width control: Amplify or attenuate the side component:
Implementation Details
Why High-Pass the Side Signal?
- Room acoustics (standing waves, reflections)
- Microphone placement differences
- Bass management in mixing
- Proximity effect variations
Problem: These random phase differences create unpredictable cancellation when:
Solution: High-pass side signal at 200Hz removes problematic low-frequency phase issues while preserving stereo width at mid/high frequencies where phase coherence is better.
Width Parameter Guidelines
| stereo_width | Perceived Effect | Recommended Use | Mono Safety |
|---|---|---|---|
| 0.0-0.3 | Narrower than original | Focusing center, reducing width | Safe |
| 0.4-0.6 | Moderate widening | General enhancement, most music | Safe with HPF |
| 0.7-0.9 | Significant widening | Electronic music, creative effects | Risky, test in mono |
| 1.0-1.3 | Extreme widening | Special effects, sound design | Not safe |
| 1.4+ | Hyper-wide, possibly inverted | Experimental only | Definitely not safe |
Parameters & Presets
Preset System
Manual parameter control only
Preset 2: Subtle Enhancement
drive=2.0, harmonic_mix=0.4, highpass_freq=90, harmonic_lowpass=600
haas: 10ms delay, 30% mix
MS width: 0.3, mono-safe: ON
Use: Gentle enhancement for natural material
Preset 3: Moderate Effect (Default)
drive=3.0, harmonic_mix=0.6, highpass_freq=100, harmonic_lowpass=800
haas: 15ms delay, 50% mix
MS width: 0.5, mono-safe: ON
Use: Balanced enhancement for most music
Preset 4: Aggressive MaxxBass Style
drive=5.0, harmonic_mix=0.8, highpass_freq=120, harmonic_lowpass=1000
haas: 20ms delay, 60% mix
MS width: 0.7, mono-safe: OFF
Use: Strong effect for EDM, hip-hop, headphones
Preset 5: Mono-Safe Widening
drive=2.5, harmonic_mix=0.5, highpass_freq=100, harmonic_lowpass=700
haas: 8ms delay, 20% mix
MS width: 0.4, mono-safe: ON
Use: Broadcast, streaming, club systems
Preset 6: Wide Stereo (not mono-safe)
drive=3.5, harmonic_mix=0.65, highpass_freq=100, harmonic_lowpass=900
haas: 25ms delay, 70% mix
MS width: 0.8, mono-safe: OFF
Use: Headphones, stereo-only playback, immersive effects
Phantom Bass Parameters
| Parameter | Type | Default | Range | Description |
|---|---|---|---|---|
| bass_low_freq | positive | 30 | 20-100 Hz | Lowest frequency for harmonic generation |
| bass_high_freq | positive | 120 | 60-200 Hz | Highest frequency for harmonic generation |
| drive | positive | 3.0 | 0.1-10.0 | Harmonic generation intensity |
| harmonic_mix | real | 0.6 | 0.0-1.0 | Dry/wet mix of harmonics |
| highpass_freq | positive | 100 | 50-200 Hz | Original bass removal cutoff |
| harmonic_lowpass | positive | 800 | 400-2000 Hz | Harmonic brightness control |
Haas Effect Parameters
| Parameter | Type | Default | Range | Description |
|---|---|---|---|---|
| apply_haas | boolean | 1 | 0/1 | Enable/disable Haas effect |
| haas_delay_ms | positive | 15 | 1-50 ms | Delay time for one channel |
| haas_mix | real | 0.5 | 0.0-1.0 | Wet/dry balance for Haas |
| level_difference_db | real | -3 | -6 to +6 dB | Delayed channel level relative to original |
Mid-Side Parameters
| Parameter | Type | Default | Range | Description |
|---|---|---|---|---|
| apply_ms_widening | boolean | 1 | 0/1 | Enable/disable M/S widening |
| stereo_width | real | 0.5 | 0.0-2.0 | Stereo width multiplier |
Safety Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| preserve_mono_compatibility | boolean | 1 | Enable safety features for mono playback |
| play_result | boolean | 1 | Auto-play processed sound |
Processing Stages
Complete Processing Pipeline
Peak Protection System
- After harmonic mixing: Harmonic addition can increase peaks
- After Haas processing: Delay-and-mix can create constructive interference
- After M/S widening: Side signal boosting can increase levels
Algorithm:
Final normalization: After all processing, scale peak to 0.99 (leaves 0.01 headroom for downstream processing).
Practical Applications
🎧 Headphone Listening Enhancement
Goal: Create immersive, bass-rich experience for headphones
Preset: Aggressive MaxxBass Style or Wide Stereo
Rationale: Headphones have no room acoustics/crossfeed, benefit from strong spatial enhancement and bass harmonics.
📻 Podcast/Voice Enhancement
Goal: Warm, present voice without boominess
Settings:
- bass_low_freq=80, bass_high_freq=200 (voice fundamentals)
- drive=1.5, harmonic_mix=0.3 (subtle)
- Haas: 5ms delay, 15% mix (minimal)
- MS width: 0.2 (slight widening)
- mono-safe: ON (broadcast essential)
🎵 Music Mastering for Streaming
Goal: Consistent impact across all playback systems
Preset: Mono-Safe Widening (modified)
Additional steps: Always A/B with reference tracks, test on phone speakers, car systems, and collapsed to mono.
Troubleshooting
Cause: Phase cancellation from Haas or M/S processing
Solution: Enable preserve_mono_compatibility, reduce Haas delay/mix, test in mono
Cause: Drive too high, harmonic_lowpass too high
Solution: Reduce drive to 2.0-3.0, lower harmonic_lowpass to 600-800Hz
Cause: Haas delay too long (>30ms)
Solution: Reduce haas_delay_ms to 10-20ms, lower haas_mix
Cause: Too much side signal, especially at low frequencies
Solution: Reduce stereo_width to 0.3-0.5, ensure mono-safe mode enabled
Cause: Extreme settings, inter-sample peaks
Solution: Reduce all levels, use more conservative settings, add external limiter
Best Practices
- Start with presets: Use Moderate Effect as baseline
- A/B constantly: Compare processed vs original
- Test in mono: Collapse to mono after processing
- Test on different systems: Headphones, laptop speakers, car
- Use reference material: Compare with professionally processed tracks
- Less is more: Subtle enhancement often works better than extreme
- Consider downstream processing: Leave headroom for further mastering
Good candidates:
- Mixes lacking low-end impact
- Material for headphone listening
- Audio for small speaker playback
- Stereo enhancement for narrow mixes
- Broadcast audio needing consistent bass
Avoid or use cautiously:
- Already bass-heavy material (can become muddy)
- Acoustic recordings needing naturalness
- Material with strong stereo effects already
- Audio destined primarily for mono playback
- Mastering for vinyl (phase issues critical)