← Back

Phase Vocoder

Time stretching without pitch change - preserve harmonics!

Original Signal

Time-Stretched Result

1.5× (slower)
256 samples
15 Hz

Original Spectrogram

Stretched Spectrogram (same pitch!)

How Phase Vocoder Works

Problem: Simply resampling a signal changes both duration AND pitch. We want to change duration while preserving pitch.

Solution: Work in the frequency domain! Analyze overlapping windows, modify the hop size for time stretching, then carefully adjust phases to maintain continuity.

Steps:

1. Window the signal into overlapping frames

2. FFT each frame to get magnitude and phase

3. Change the synthesis hop size (different from analysis hop)

4. Adjust phases to match the new hop size

5. Inverse FFT and overlap-add to reconstruct

Applications: Music production, DJ software, audio books, video slow motion.