How to change a loop's tempo: time-stretch vs resample, with the math
Free kit: Free Cozy Audio kit bundles this with the other tools you need.
You found a loop at 120 BPM and your song is at 128. You can make it fit in two very different ways: resample it (speed up the playback, so pitch rises too, like a turntable) or time-stretch it (change length while keeping pitch). Each has a sound and a cost. This guide explains both and works out the numbers so you know what to expect before you drag anything.
The key ratio
Everything starts from the speed ratio:
Ratio = target BPM / original BPM.
For 120 to 128 BPM: 128 / 120 = 1.0667, a change of about 6.7%.
New length
The loop gets shorter by the same ratio. For a 4-bar loop in 4/4:
- At 120 BPM: 60 / 120 x 4 x 4 = 8 seconds
- At 128 BPM: 60 / 128 x 4 x 4 = 7.5 seconds
Check: 8 / 1.0667 = 7.5.
In samples at 48 kHz: 8 x 48,000 = 384,000 samples becomes 7.5 x 48,000 = 360,000 samples. The loop and sample length calculator gives exact sample counts for any tempo and rate, which helps loops repeat without drifting.
Option 1: resample (pitch moves)
Resampling plays the audio faster or slower. Pitch shifts by:
Semitones = 12 x log2(ratio).
For 120 to 128: 12 x log2(1.0667) = 12 x 0.0931 = about +1.12 semitones.
So the loop gets about one semitone (plus a little) higher. That matters if the loop has pitched content: a bassline in A will now sit between A-sharp and B, out of tune with the rest of your song.
When resampling is a good choice
- Drum loops, where a small pitch change only makes the kit slightly brighter.
- Lo-fi, house and hip hop styles where the "sped-up" or "slowed-down" character is the point.
- When the ratio is a semitone-friendly value you can plan around (pitch the whole song to match).
- Small changes of a few BPM, where the shift is barely audible.
Option 2: time-stretch (pitch stays)
Time-stretching keeps the original pitch by analyzing the audio and rebuilding it at the new length. Modern algorithms are good, but they are always making compromises. Artifacts to listen for:
- Smeared transients: drums lose their snap, or hits double up ("flamming").
- Phasey or metallic tone on sustained sounds and vocals.
- Wobble on long notes.
Most DAWs offer several modes. Typical choices:
- Beats/rhythmic mode for drums: slices at transients and keeps hits crisp.
- Tonal mode for single-note lines such as bass or vocals.
- Complex/polyphonic mode for full mixes and chords, which costs more CPU.
As a general rule, small stretches sound cleaner than large ones. If a stretch sounds rough, try a different mode before giving up.
Worked example: slowing a loop down
A 128-BPM chord loop into a 120-BPM song.
- Ratio: 120 / 128 = 0.9375
- Resampled pitch change: 12 x log2(0.9375) = 12 x (-0.0931) = about -1.12 semitones
- New 4-bar length: 7.5 / 0.9375 = 8 seconds
Because chords are pitched, time-stretch here (tonal or complex mode), or resample and then transpose the rest of your song down about a semitone to match.
Half-time and double-time
Big jumps are often not jumps at all. A 70-BPM loop in a 140-BPM song fits as-is: one bar of the loop spans two bars of the song, a half-time feel. Likewise a 170-BPM drum break can sit in an 85-BPM track. Before stretching by 50%, check whether halving or doubling the count gets you there with no processing.
Keep delays and effects in sync
After a tempo change, delay times set in milliseconds will be wrong. At 120 BPM a quarter note is 500 ms; at 128 BPM it is 60,000 / 128 = 468.75 ms. Use tempo-synced delays, or recalculate with the BPM to ms calculator. The 120 BPM in ms page lists common note values.
A workflow that avoids surprises
1. Confirm the loop's original tempo (count bars against its length, or tap along).
2. Calculate the ratio and pitch shift with the time stretch and pitch calculator.
3. If the shift is under a semitone and the loop is drums, try resampling first.
4. If it is pitched material, time-stretch in a matching mode, or plan the song's key around the resampled pitch.
5. Trim to the exact sample length, check the loop point, and listen through several repeats. How to make seamless audio loops covers clean loop points.
6. Keep the original file. Stretch a copy, so you can redo it with a different mode later.