Spectral Feature-Driven Vibrato — User Guide
Intelligent adaptive modulation: analyzes spectral characteristics of audio to automatically generate customized vibrato parameters—flatness controls depth, roughness controls rate—creating perfectly tailored pitch modulation for each unique sound.
What this does
This script implements an intelligent, adaptive vibrato effect that analyzes the spectral characteristics of input audio and automatically generates customized vibrato parameters. By measuring two key spectral features—spectral flatness (noise-to-tonal ratio) and spectral roughness (inharmonicity)—the system determines optimal vibrato depth and rate for each specific sound. The result is vibrato that feels naturally suited to the source material, with noisy sounds receiving subtle modulation and tonal sounds receiving more pronounced, musical vibrato.
Key Features:
- Automatic Parameter Generation — No manual tuning required
- Spectral Feature Analysis — Measures flatness and roughness
- Intelligent Mapping — Converts features to musical parameters
- Non-destructive Processing — Preserves original sound
- Real-time Analysis Feedback — Displays calculated parameters
- Smooth Delay-line Implementation — High-quality pitch modulation
Technical Implementation: (1) Source preservation: Creates working copy to protect original. (2) Spectral analysis: Converts to spectrum and analyzes 80-5000 Hz range. (3) Feature extraction: Calculates spectral flatness (tonal vs noise character) and roughness (inharmonicity). (4) Parameter mapping: Converts features to vibrato depth (0.05-0.20 semitones) and rate (4-7 Hz). (5) Vibrato application: Uses delay-line pitch shifting with smooth interpolation. (6) Feedback: Displays analysis results and applied parameters.
Quick start
- In Praat, select exactly one Sound object (any material).
- Run script… →
spectral_feature_vibrato.praat. - The script automatically:
- Creates a safety copy of your sound
- Analyzes spectral characteristics
- Calculates optimal vibrato parameters
- Applies customized vibrato to the copy
- Check the Info window for analysis results:
- Spectral Flatness and Roughness values
- Calculated vibrato depth and rate
- Processing confirmation
- The modified sound automatically plays and is selected.
- Your original sound is preserved unchanged.
Spectral Analysis Theory
The Adaptive Vibrato Concept
Why One Size Doesn't Fit All
Different sounds require different vibrato characteristics:
🔍 Spectral Analysis Range
The script analyzes frequencies between 80 Hz and 5000 Hz because:
- Below 80 Hz: Often rumble, not musically relevant for vibrato
- Above 5000 Hz: Harmonic structure less important for vibrato perception
- 80-5000 Hz: Covers fundamental frequencies and most important harmonics where vibrato has maximum perceptual impact
This focused analysis provides cleaner, more relevant feature measurements.
Digital Signal Processing Foundation
Spectrum Analysis in Praat
The script uses Praat's built-in spectrum analysis:
Why Power Spectrum?
Amplitude spectrum: Shows voltage levels
Power spectrum: Shows energy (amplitude squared)
Why use power?
- Better represents perceptual loudness
- More robust for mathematical operations
- Standard for acoustic feature extraction
- Reduces effect of phase relationships
The script uses power spectrum for both flatness and roughness calculations
Spectral Features
Spectral Flatness
📊 Tonal vs Noise Character
Definition: Ratio of geometric mean to arithmetic mean of power spectrum
Interpretation of values:
- 0.0: Perfectly tonal (single frequency)
- 0.0-0.3: Very tonal (voices, instruments)
- 0.3-0.7: Mixed character (typical speech/music)
- 0.7-1.0: Very noisy (consonants, noise)
- 1.0: Perfect white noise
Spectral Roughness
Inharmonicity and Spectral Variation
Definition: Average absolute difference between each frequency bin and its local neighbors
Roughness Interpretation
0.000-0.005: Very smooth (sine waves, some vowels)
0.005-0.015: Smooth (most musical tones, clean vocals)
0.015-0.030: Moderate (typical speech, complex tones)
0.030-0.050: Rough (consonants, noisy sounds)
0.050+: Very rough (unpitched percussion, noise)
Note: Actual values depend on amplitude scaling—the script uses relative measurements within the adaptive mapping
Feature Correlation
How Flatness and Roughness Relate
Low Flatness + Low Roughness:
Pure tones, whistles, sine waves → Deep, slow vibrato
Low Flatness + High Roughness:
Inharmonic tones, bells, metallic sounds → Medium parameters
High Flatness + Low Roughness:
Filtered noise, some consonants → Subtle, fast vibrato
High Flatness + High Roughness:
Noise, unpitched sounds → Very subtle modulation
The script uses both features for robust parameter determination
Parameter Mapping
🎛️ From Analysis to Musical Parameters
Vibrato Depth Mapping (0.05-0.20 semitones)
Vibrato Rate Mapping (4-7 Hz)
Mapping Rationale
Perceptual Considerations
Why these specific ranges work well:
Musical Context Adaptation
Lead melodies (tonal):
Low flatness → Deeper depth (0.06-0.12)
Medium roughness → Medium rate (5-6 Hz)
Result: Expressive, singing quality
Background pads (mixed):
Medium flatness → Medium depth (0.10-0.15)
Variable roughness → Adaptive rate
Result: Supportive without distraction
Percussive elements (noisy):
High flatness → Subtle depth (0.05-0.08)
High roughness → Faster rate (6-7 Hz)
Result: Subtle enhancement without pitch confusion
The adaptive approach works across diverse musical material
Delay-Line Vibrato Implementation
Smooth Pitch Shifting
The vibrato uses delay-line modulation with sample interpolation:
Why Delay-Line Vibrato?
Computational efficiency: Single formula evaluation
High quality: Uses original samples (no resynthesis artifacts)
Natural sound: Creates authentic pitch modulation
Preserves timing: No time-stretching side effects
Compared to other methods:
Phase vocoder: More computational, potential artifacts
Resampling: Can affect duration and quality
Delay-line: Clean, efficient, natural-sounding
The 5 ms base delay provides good pitch variation range
Processing Workflow
🔄 Step-by-Step Processing Pipeline
STEP 1: Source Verification and Preparation
STEP 2: Spectral Analysis
STEP 3: Parameter Mapping
STEP 4: Vibrato Application
STEP 5: Completion and Feedback
Info Window Output
Understanding the Analysis Feedback
=== STEP 1: Sound selected ===
Original sound: my_vocal_sustain
=== STEP 2: Copy created ===
Copy name: copy_of_my_vocal_sustain
=== STEP 3: Spectral Analysis ===
Spectral Flatness: 0.124567
Spectral Roughness: 0.008342
=== Scaled Vibrato Parameters ===
Vibrato Depth: 0.069 semitones
Vibrato Rate: 5.25 Hz
=== STEP 4: Applying Smooth Vibrato to Copy ===
Smooth vibrato applied successfully!
Final sound: final_vibrato_my_vocal_sustain
=== COMPLETE ===
Original sound preserved: my_vocal_sustain
Vibrato-modified sound ready: final_vibrato_my_vocal_sustain
This provides complete transparency about the processing
Object Management
Clean and Efficient Processing
The script carefully manages Praat objects:
Applications
Vocal Processing
Use case: Adding natural-sounding vibrato to sustained vocals
Technique: Let the script analyze and adapt to each vocal character
Benefits:
- Different singers receive customized parameters
- Vowel sounds get appropriate depth and rate
- Consonants and breath sounds receive subtle treatment
- Creates consistent but natural vibrato across performance
Result: Vocals with authentic, context-appropriate vibrato
Instrument Enhancement
Use case: Adding vibrato to sampled or synthetic instruments
Technique: Process individual notes or phrases
Instrument-specific results:
- Strings: Rich, expressive vibrato matching instrument character
- Woodwinds: Appropriate modulation for each instrument type
- Brass: Powerful but controlled vibrato
- Synth pads: Smooth, evolving modulation
Result: Instruments with naturally enhanced expression
Sound Design
Use case: Adding organic motion to synthetic sounds
Technique: Process synthesized tones and textures
Creative applications:
- Add life to static synth tones
- Create evolving textures from simple sounds
- Enhance realism in physical modeling
- Add natural variation to repetitive elements
Result: More organic, living synthetic sounds
Educational and Research Use
Use case: Studying vibrato perception and parameter choices
Technique: Analyze diverse sounds and observe parameter choices
Learning opportunities:
- Understand relationship between spectral features and perception
- Explore optimal vibrato parameters for different sound types
- Compare adaptive vs fixed parameter approaches
- Study cross-cultural vibrato preferences
Value: Practical insight into adaptive audio processing
Practical Workflow Examples
🎤 Lead Vocal Enhancement
Goal: Add expressive vibrato to vocal sustain
Process:
- Select sustained vowel section
- Run script - typically gets depth 0.06-0.10, rate 5-6 Hz
- Compare original and processed
- Use Info window to understand parameter choice
Result: Naturally enhanced vocal with appropriate vibrato
🎻 String Section Sweetening
Goal: Add warmth to string samples
Process:
- Select string section or individual notes
- Run script - typically gets depth 0.08-0.12, rate 4-5 Hz
- Blend with original to control intensity
- Process different instruments separately
Result: Warmer, more expressive string sounds
🔊 Synthetic Texture Animation
Goal: Add organic motion to synth pads
Process:
- Select static synth tone or pad
- Run script - parameters vary with synth character
- Experiment with different synth sounds
- Layer multiple processed versions
Result: More living, evolving synthetic textures
Advanced Techniques
- Process only sustained sections of audio
- Use different analysis windows for different sound types
- Combine with manual parameter tweaking when needed
- Create vibrato automation by processing short segments
- Process similar sounds from different sources
- Compare parameter choices across sound categories
- Build intuition about spectral feature relationships
- Develop personal mappings based on preferred results
Troubleshooting Common Issues
Cause: Very noisy source material, very short sound
Solution: Try more tonal source material, longer audio segments
Cause: Extreme spectral characteristics, very brief sounds
Solution: Use sounds longer than 0.5 seconds, avoid extreme noise
Cause: No sound selected, Praat environment issue
Solution: Ensure sound is selected, check Praat version
Cause: Spectral analysis computational load
Solution: Process shorter segments, use faster computer
Technical Deep Dive
Algorithm Optimization
Efficient Spectral Analysis
The script uses optimized analysis techniques:
Computational Complexity
Spectral analysis: O(n) where n = number of frequency bins
Feature calculation: O(n) for flatness and roughness
Vibrato application: O(m) where m = number of samples
Typical performance:
1-second sound: 0.5-2 seconds total processing
10-second sound: 3-10 seconds total processing
60-second sound: 20-60 seconds total processing
Bottleneck: Spectral analysis for long files
Optimization: The 80-5000 Hz range reduces n significantly
Psychoacoustic Foundations
Why These Features Work
Cross-Cultural Vibrato Patterns
Western classical singing:
Depth: 0.5-1.0 semitones, Rate: 5-7 Hz
Western string instruments:
Depth: 0.2-0.5 semitones, Rate: 5-6 Hz
Indian classical music:
Depth: 0.1-0.3 semitones, Rate: 4-6 Hz (andolan)
Middle Eastern music:
Depth: 0.2-0.8 semitones, Rate: 4-7 Hz (tahrir)
The script's ranges accommodate diverse musical expressions while avoiding extremes
Future Extensions
Potential Algorithm Enhancements
Dynamic analysis: Track features over time for evolving vibrato
Multi-band processing: Different parameters for different frequency ranges
Context awareness: Consider musical context and role
User preference learning: Adapt mapping based on user feedback
Real-time implementation: Adaptive vibrato in live performance
Research applications:
- Study of optimal vibrato parameters
- Cross-cultural vibrato comparison
- Perceptual validation of adaptive approach
- Development of more sophisticated feature sets