Piano Roll Theorymusic theory for producers
Start
0%
7.3Part 7, Sound and Theory

Pitching and Time-Stretching Samples

Here, you'll understand what happens when you change the pitch or the tempo of a sample, why the two are linked, and how to separate them without damaging the sound.

15 min8 questions
View

You've found a perfect guitar loop, but it's in E minor at 85 BPM, and your track is at 95. Or you want a vocal to go up a whole tone without sounding like a cartoon character. Either way, you're going to touch the pitch and the speed of a recording. This lesson explains the link between the two, with the few numbers that will save you from trial and error.

Faster means higher

Think of a vinyl record or a cassette. If you play them faster, the music speeds up and gets higher at the same time. The reason is simple: all the recorded vibrations go by faster, so all the frequencies go up. Double the speed, and every frequency doubles: everything goes up an octave, and the loop lasts half as long. Slow it down by half, and everything drops an octave while lasting twice as long.

DAWs call this way of doing things repitch: you change the playback speed, and the pitch follows. Listen to a short original pattern, then the same pattern played twice as fast.

The pattern goes up an octave and lasts half as long. In the piano roll, it looks like the next figure: the copy played at double speed fits in half a bar, twelve rows higher.

E5D5C5A4G4E4D4C4A3G3OriginalRepitch
In the scaleRows of A minor
Bar 1: the original pattern in eighth notes. Bar 2: the same pattern played twice as fast, an octave higher and half as long.

A semitone is about 6 percent of speed

Between the octave and nothing at all, there are all the semitones. Since the octave doubles the frequency in twelve equal semitones, each semitone multiplies the frequency, and so the speed, by about 1.0595. Going up one semitone means speeding up by roughly 6 percent; going up two semitones means speeding up by about 12 percent.

TranspositionSpeed ratioA loop at 100 BPM becomes
+1 semitone1.0595105.9 BPM
+2 semitones1.1225112.2 BPM
+3 semitones1.1892118.9 BPM
+5 semitones1.3348133.5 BPM
+7 semitones1.4983149.8 BPM
+12 semitones, one octave2200 BPM
−1 semitone0.943994.4 BPM
−2 semitones0.890989.1 BPM
−12 semitones, one octave0.550 BPM
What repitch does to the tempo: each transposition corresponds to a fixed speed ratio.

This table tells you something important: with repitch, pitch and tempo are tied to each other. If you want to take a loop from 90 to 100 BPM, you need to speed it up by a ratio of about 1.111, which raises the pitch by about 1.82 semitones. The loop then falls between two notes, 18 cents short of a whole tone: it's no longer in any key your DAW knows.

WorkshopPitching a sampleFull screen
Try a few transpositions and read the speed ratio that goes with each one, then do the reverse calculation from two tempos.

From pitch to tempo

Speed ratio×1.1225
Playback speed+12.25%
New tempo101.02 BPM
4 bars last9.5 s

With repitch, shifting by +2 semitones multiplies the playback speed by 1.1225. A loop at 90 BPM therefore moves to 101.02 BPM, and its 4 bars last 9.5 seconds instead of 10.67.

A short phrase stands in for the sample. Repitch: pitch and tempo change together, like a sped-up record. Time-stretch: only the tempo changes. Pitch-shift: only the note changes.

From tempo to pitch

Shift+0.94 semitones
In cents+94 cents
Speed ratio×1.0556

Going from 90 to 95 BPM with repitch raises the sample by 0.94 semitones. That is not a whole number of semitones: the sample will sound out of tune with the rest. Stick with time-stretch, or choose 95.35 BPM, which gives exactly +1 semitone.

Repitch, time-stretch and formants

With repitch, your DAW plays the sample faster or slower, like speeding up a record: pitch and tempo change together. Going up one half step multiplies the speed by about 1.0595, and going up an octave, which is 12 half steps, doubles it exactly.

Time-stretch, on the other hand, changes the length without touching the pitch, and its opposite, pitch-shifting, changes the pitch without touching the length. Both slice the sound into tiny pieces. Pushed too far, it leaves artifacts: soft transients, a metallic or grainy sound.

Formants are the resonances that give a voice or an instrument its character. With repitch, they move with the note: a voice pitched up sounds like a cartoon character, a voice pitched down sounds huge. Formant-preserving algorithms change the note while keeping that character.

Time-stretching separates pitch and tempo

Fortunately, your DAW can also do things differently. Time-stretching changes the length of a sound without changing its pitch. It cuts the recording into tiny pieces, then repeats them or squeezes them together to make the whole thing longer or shorter, without changing the playback speed of each piece. The reverse operation exists too: pitch-shifting changes the pitch without touching the length.

These buttons imitate a perfect result. In reality, every process leaves traces, called artifacts: drum attacks that smear, a slightly metallic or grainy sound, a strange echo on vocals. The bigger the change, the more you hear these traces. Changing the tempo by a few percent usually goes unnoticed; halving the tempo can almost always be heard.

Formants, or why a voice changes size

Raise a vocal a few semitones with repitch, and it no longer sounds like the same person singing higher: it seems smaller, younger, almost comical. Lower it, and it becomes huge, like a giant's. It isn't just the note that moved; the formants moved too.

Formants are frequency zones that the shape of the throat, mouth and nose reinforces, whatever note is being sung. They give each vowel and each voice its color. When someone sings higher, their formants stay roughly in the same place; only the fundamental and its harmonics go up. Repitch, on the other hand, moves everything, formants included, as if the throat were shrinking.

That's why many pitch-shifting tools offer to preserve the formants, or to move them separately. Preserve them so a vocal can change notes without changing character. Move them deliberately when you're after an effect: a high, strange vocal for a hook, or a deep, dark vocal for a menacing section.

Choosing between repitch and time-stretching

In practice, ask yourself two questions. Do you want to change the key, the tempo, or both? And if you're changing both, does the change land on a whole number of semitones? To change only the key, use pitch-shifting, choosing the shortest path: to go from G minor to A minor, go up two semitones rather than down ten. To change only the tempo, use time-stretching.

To change both, first work out the tempo ratio. When it lands almost exactly on a whole number of semitones, repitch is often the best solution, because it creates none of the artifacts of time-stretching: the sound isn't chopped up, it's just played faster. Many producers also like the color it gives drums, tighter when you speed up, heavier when you slow down.

Exercisetry it in your DAW too

Your loop is in E minor at 85 BPM, and your project is at 95 BPM. Work out how far the pitch would go up if you brought the loop to 95 BPM with repitch. Which key would it land in? What do you do next?

In the next lesson, we're going to detune sounds on purpose, by just a few cents, to understand what makes a synth sound wide.

Check your understanding

8 questions
1.
You play a loop twice as fast with repitch. What happens?
2.
By how much is the speed multiplied when you raise a sample by one semitone with repitch?
3.
A loop at 100 BPM is raised two semitones with repitch. What is its new tempo?
4.
Which process changes a sample's tempo without changing its pitch?
5.
You raise a vocal by four semitones and it sounds like a cartoon character. What do you adjust?
6.
Your sample is in G minor and your track is in A minor. Which transposition do you usually choose?
7.
You bring a loop from 90 to 100 BPM with repitch. Why is that a problem?
8.
What is a formant?

A lesson is completed automatically at 70% on the quiz. You can also mark it yourself.

A question, a mistake, a word about this lesson? Write to us.

Your address is only used to reply to you.