Time stretching is the audio process that changes the duration or tempo of a recording without changing its pitch. Among audio effects it is the counterpart of pitch shifting: one alters time while keeping pitch, the other alters pitch while keeping time, and both rely on the same family of algorithms.
Simply playing a recording faster or slower changes speed and pitch together, as with tape or vinyl. Time stretching decouples the two by analyzing the signal and rebuilding it with more or fewer repetitions of its short-term content, which is why it is central to tempo matching, beat editing, dialogue fitting and sound design.
How time stretching works
All practical methods cut the audio into short overlapping segments, typically a few milliseconds to around 100 ms long, and then reassemble them at a different spacing. Stretching repeats or spreads the content; compressing in time skips or overlaps more of it. The challenge is to join the segments without audible clicks, phasing or smearing.
Time-domain methods such as overlap-add and its improved variant WSOLA find the best alignment between neighboring segments by waveform similarity, which works well for speech and monophonic material. Frequency-domain methods, chiefly the phase vocoder, analyze the signal with a short-time Fourier transform, adjust the phase of each frequency bin to the new time grid and resynthesize it, which handles complex polyphonic material better.
The main algorithm families are compared in the following table.
| Method | Principle | Best suited for | Typical artifacts |
|---|---|---|---|
| Overlap-add (OLA, WSOLA) | Splices waveform segments | Speech, single voices | Doubling, stutter on chords |
| Phase vocoder | Adjusts phase per frequency bin | Pads, polyphonic music | Phasiness, smeared transients |
| Granular | Rearranges small grains | Sound design, textures | Graininess, metallic tone |
| Transient-preserving hybrids | Splits transients from tonal parts | Mixed music, drums | Fewer, but still at extremes |
| Slice-based | Cuts at beats and moves slices | Drum loops | Gaps or tails between hits |
Stretch ratios and quality ranges
Quality depends strongly on the stretch ratio. Small changes are nearly transparent with modern algorithms, while extreme ratios become a creative effect rather than a correction. A useful rule is that the further from 1.0, the more the material type matters.
| Tempo change | Stretch ratio | Typical result |
|---|---|---|
| Within about 5 percent | 0.95 to 1.05 | Usually transparent on most material |
| 5 to 15 percent | About 0.85 to 1.15 | Good on suitable material, audible on dense mixes |
| 15 to 50 percent | About 0.67 to 1.5 | Noticeable artifacts, careful algorithm choice |
| Double or half speed | 2.0 or 0.5 | Clearly processed sound |
| Extreme stretching | 10 or more | Ambient textures, sound design |
Two parameters control the character of most algorithms. The window or grain size sets the time-frequency trade-off: long windows give clean, stable tones but smear transients, while short windows keep attacks sharp but make sustained tones rough. Transient detection marks attacks so that they are copied rather than stretched, preserving the punch of drums and plucked notes.
Time stretching compared with related effects
Time stretching belongs to a group of time and pitch manipulation tools that share algorithms but serve different purposes.
| Effect | Changes duration | Changes pitch |
|---|---|---|
| Time stretching | Yes | No |
| Pitch shifting | No | Yes |
| Varispeed or resampling | Yes | Yes, together |
| Pitch correction | No | Yes, selectively per note |
| Formant shifting | No | Changes vocal character only |
Pitch shifting is often implemented as time stretching followed by resampling: the audio is stretched by the desired ratio and then played back at a correspondingly different rate, restoring the original duration at a new pitch. This explains why the two effects show the same artifacts at similar ratios.
Using time stretching in production
Workstations expose time stretching through elastic audio or warping modes, where markers placed on beats can be moved to a grid, and the audio between them is stretched accordingly. Choosing the mode that matches the material is the most important practical decision.
| Material | Recommended mode | Reason |
|---|---|---|
| Drum loops | Slice or transient-based | Keeps hits sharp, adjusts gaps |
| Solo vocals and speech | Monophonic or time-domain | Natural voice, few phasing artifacts |
| Full mixes | High-quality hybrid or phase vocoder | Handles dense polyphony |
| Pads and textures | Phase vocoder or granular | Smooth sustained tones |
| Dialogue for picture | Speech-optimized, small ratios | Fits timing invisibly |
Typical tasks include matching the tempo of samples to a project, tightening a live drum performance, fitting a radio commercial to an exact length, aligning overdubs and creating DJ mixes in which tracks with different tempos play together. Offline rendering with the highest-quality algorithm is preferable to real-time processing when CPU allows it.
Artifacts and common mistakes
Most problems come from asking one algorithm to do everything. A setting that sounds perfect on a vocal can blur a drum kit, and stacking several stretch operations multiplies artifacts.
- Transient smearing makes drums soft and distant; switch to a transient-preserving or slice mode.
- Phasiness and a hollow, metallic sound are typical of phase vocoders at large ratios.
- Doubled or stuttering attacks appear in time-domain methods on complex material.
- Repeated processing degrades quality; always stretch from the original file rather than an already stretched copy.
- Stereo image shifts can occur when channels are processed independently; use linked stereo processing.
In plain words
Time stretching makes a recording longer or shorter without making voices sound like chipmunks or giants. A song can be slowed down for practice or sped up to match another song, and the notes stay in the same key.
It works by cutting the sound into tiny pieces and repeating or dropping some of them very carefully. Small changes are almost impossible to hear, while big changes start to sound strange, which some musicians use on purpose as an effect.
A real-world example
A radio production studio receives a finished commercial that runs 31.4 seconds, but the station slot is exactly 30 seconds. Rather than re-recording the voice actor, the engineer applies a speech-optimized time stretching algorithm to the whole spot, compressing it by about 4.5 percent.
Because the ratio is small and the algorithm is designed for speech, the voice keeps its natural pitch and tone, and the music bed is stretched separately with a polyphonic mode before the two are remixed. The client hears no difference except that the spot now fits the slot precisely, and the change takes minutes instead of a new recording session.