Dynamic Spectral Hole — User Guide
Pitch-adaptive spectral filtering: analyzes fundamental frequency, creates moving notch filter that tracks pitch to remove harmonics or fundamental, producing hollow/filtered timbres for experimental sound design.
What this does
This script creates pitch-adaptive spectral notch filter — removes specific frequency band determined by audio's fundamental frequency. Process: (1) Analyze pitch using Praat's pitch detection (finds mean F0), (2) Define notch range based on F0 (lower bound = mean F0, upper bound = mean F0 × octave_multiplier), (3) Convert audio to frequency domain via FFT, (4) Attenuate frequencies in notch range (multiply by notch_attenuation factor, typically 0.01-0.3), (5) Convert back to time domain. Result: Removes fundamental and/or lower harmonics, creates hollow/filtered timbre, useful for removing voice fundamental, isolating upper partials, or creating robotic/filtered effects. Unlike static notch filters (fixed frequencies), this adapts to audio's pitch content.
Quick start
- In Praat, select Sound object (speech or music).
- Run script… →
Dynamic_Spectral_Hole.praat. - Choose Processing_preset (try "Voice fundamental (speech)" for speech, "Music fundamental" for music).
- For first use: Keep default settings (presets override manual parameters).
- Click OK — Wait for processing (no progress indicator, be patient).
- New Sound object created:
originalname_pitch_notched, auto-plays if enabled. - Compare with original to hear spectral hole effect.
Presets
Available Presets
1. Custom settings
Uses manual parameters. Set all values yourself for full control. Good for experimentation or specific use cases not covered by presets.
Default custom values: Time step 0.1s, Pitch 75-600 Hz, Octave multiplier 2, Attenuation 0.1
2. Voice fundamental (speech)
Removes speech fundamental frequency. Time step: 0.01s (detailed pitch tracking), Pitch range: 75-300 Hz (typical speech), Octave multiplier: 1.5 (narrow notch, just F0), Attenuation: 0.05 (95% removal).
Effect: Thin, tinny voice. Removes vocal warmth/body. Creates telephone-like quality. Breathiness/consonants remain. For: Robotic effects, filtered vocals, de-emphasis of fundamental, highlighting formants.
3. Voice harmonics (speech)
Removes fundamental + lower harmonics. Time step: 0.01s, Pitch range: 75-300 Hz, Octave multiplier: 4 (wide notch up to 4× F0), Attenuation: 0.2 (80% removal).
Effect: Very hollow voice. Removes fundamental + first few harmonics. Emphasizes high formants and sibilants. Whisper-like quality. For: Ghostly voices, extreme filtering, isolating high-frequency speech components.
4. Music fundamental
Removes musical fundamental. Time step: 0.05s, Pitch range: 50-800 Hz (wider than speech), Octave multiplier: 2 (fundamental + octave), Attenuation: 0.1 (90% removal).
Effect: Hollow instrument tone. Removes pitch but retains timbre/harmonics. Creates "missing fundamental" illusion (brain fills in removed pitch). For: Experimental music, harmonic analysis, timbral manipulation.
5. Music upper partials
Removes wide range including many harmonics. Time step: 0.05s, Pitch range: 50-800 Hz, Octave multiplier: 8 (very wide notch up to 8× F0), Attenuation: 0.15 (85% removal).
Effect: Extreme filtering. Removes fundamental and multiple harmonics. Leaves only highest partials and noise components. For: Radical sound design, isolating breath/bow noise, creating ethereal textures.
6. Aggressive notch
Maximum removal with moderate bandwidth. Time step: 0.01s, Pitch range: 75-600 Hz, Octave multiplier: 3 (fundamental + harmonics), Attenuation: 0.01 (99% removal).
Effect: Nearly complete removal of notch band. Dramatic hollowing. Extreme timbral change. For: Special effects, radical filtering, demonstrating notch effect clearly.
7. Gentle notch
Subtle filtering with partial removal. Time step: 0.1s, Pitch range: 75-600 Hz, Octave multiplier: 2, Attenuation: 0.3 (70% removal).
Effect: Mild hollowing. Noticeable but not extreme. Retains more naturalness. For: Subtle timbral shaping, corrective filtering, musical applications where extreme effect unwanted.
Parameters
Pitch Analysis Parameters
| Parameter | Default | Description |
|---|---|---|
| time_step | 0.1 s | Pitch analysis frame rate. Smaller = more detailed tracking (0.01s for speech, 0.05s for music). Affects processing time but not notch frequency (uses mean pitch over entire file). |
| minimum_pitch | 75 Hz | Lowest expected pitch. Speech: 75 Hz (male), Music: 50 Hz (bass instruments). Must be below actual audio pitch for accurate detection. |
| maximum_pitch | 600 Hz | Highest expected pitch. Speech: 300 Hz (female), Music: 800 Hz (soprano/high instruments). Must be above actual audio pitch. |
Notch Range Parameters
| Parameter | Default | Description |
|---|---|---|
| octave_multiplier | 2 | Defines notch upper bound: upper_freq = mean_pitch × multiplier. Values: 1.5 (narrow, just fundamental), 2-3 (fundamental + few harmonics), 4-8 (wide, many harmonics). Higher = wider notch. |
| notch_attenuation | 0.1 | Multiplier for frequencies in notch band (0 = complete removal, 1 = no effect). Typical: 0.01-0.05 (aggressive 95-99% removal), 0.1-0.2 (strong 80-90% removal), 0.3-0.5 (gentle 50-70% removal). |
Spectrum Parameters
| Parameter | Default | Description |
|---|---|---|
| fast_fourier | no (0) | Use Fast Fourier Transform for spectrum conversion. "no" = standard DFT (slower, more accurate). "yes" = FFT (faster, requires power-of-2 length). Usually keep at "no" unless processing very long files. |
Output Options
| Parameter | Default | Description |
|---|---|---|
| scale_peak | 0.99 | Normalize output to this peak amplitude. 0.99 prevents clipping. Lower values (0.7-0.9) reduce overall level. 1.0 = full scale (may clip). |
| play_after_processing | 1 (yes) | Automatically play processed audio when complete. Useful for immediate comparison. Set to 0 to skip playback. |
| keep_intermediate_objects | 0 (no) | Keep Pitch and Spectrum objects after processing. Usually set to 0 (auto-cleanup). Set to 1 for debugging or manual inspection of pitch/spectrum. |
Applications
Voice Processing
- Telephone/radio effect: Voice fundamental preset creates classic filtered communication sound (removes warmth, emphasizes formants)
- Robotic voices: Aggressive notch + pitch shifting creates mechanical vocal quality
- Ghostly vocals: Voice harmonics preset (wide notch) produces ethereal, hollow voice
- Formant isolation: Remove fundamental to analyze/hear formant structure clearly (linguistic research)
- Vocal effects: Layer notched version with original at different levels (partial hollowing effect)
Music Production
- Harmonic manipulation: Remove fundamental to emphasize upper partials/overtones (creates airy, ethereal quality)
- Instrument timbre exploration: Hear what instrument sounds like without pitch (reveals noise/breathiness/bow texture)
- Missing fundamental illusion: Brain perceives removed fundamental even when absent (psychoacoustic effect demonstration)
- Creative filtering: Unusual timbral effect for experimental/electronic music (hollow, filtered aesthetic)
- Mixing tool: Remove fundamental from pad/texture to make space for bass (frequency sculpting)
Sound Design
- Filtered atmospheres: Apply to drones/textures for hollow, mysterious quality
- Sci-fi effects: Notched voices/sounds for alien/synthetic character
- Radio/comms effects: Speech fundamental removal for walkie-talkie, radio, phone sounds
- Layering base: Use notched version as layer with EQ'd original (complex spectrum)
- Underwater/filtered scenes: Wide notch creates muffled/distant quality
Research & Analysis
- Harmonic series study: Remove fundamental to isolate/analyze harmonic content
- Pitch perception: Demonstrate missing fundamental phenomenon (psychoacoustics)
- Formant analysis: Speech formants more audible without fundamental masking
- Timbre deconstruction: Understand contribution of fundamental vs harmonics to timbre
- Teaching tool: Demonstrate spectral filtering concepts audibly
- Notch + Reverb: Hollow vocal → reverb creates ghostly presence (space + filtering)
- Notch + Pitch shift: Remove fundamental → pitch shift → re-add fundamental at different pitch (harmonic transplanting)
- Notch + Distortion: Hollow sound → distortion adds new harmonics (fills spectral hole with distortion artifacts)
- Notch + Time-stretch: Remove fundamental → stretch → creates ethereal, filtered drone
- Parallel processing: Mix notched (20%) with original (80%) for subtle hollowing without complete removal
Technical Details
Processing Pipeline
Notch Filter Mathematics
Computational Complexity
Tips & Troubleshooting
Optimization Strategies
- Test on short clips: Extract 5-10 second segment, process, verify effect, then process full file
- Lower sample rate: Resample audio to 22050 Hz before processing (2× faster, acceptable quality loss for effects)
- Segment processing: Split long file into 30-second chunks, process separately, concatenate (allows progress monitoring)
- Coarser pitch analysis: Increase time_step to 0.2 (faster pitch analysis, minimal effect on notch placement since mean pitch used)
Common Issues
Cause: Notch_attenuation too high (e.g., 0.8-1.0) — minimal removal
Solution: Lower notch_attenuation to 0.05-0.2 for clear effect
Cause: Pitch detection failed → notch placed incorrectly, or notch too wide (high octave_multiplier)
Solution: Verify pitch range matches audio (listen to Pitch object if kept). Reduce octave_multiplier to 1.5-2.
Cause: Spectral filtering can introduce phase distortion/artifacts
Solution: Increase notch_attenuation (gentler removal), or use narrower notch (lower octave_multiplier). Some artifacts inherent to frequency-domain processing.
Cause: FFT processing in progress (no visual feedback)
Solution: Wait patiently. Check Praat status bar (bottom) — if not frozen, processing continues. For very long files, can take 1-2 minutes.
Cause: Speech pitch range (75-300 Hz) too narrow for music
Solution: Use Music presets with wider range (50-800 Hz). For polyphonic music, pitch detection may fail (script assumes monophonic/dominant pitch).