Skip to content
12notez

How to Match a Sample to Your Project Tempo

Fit a loop recorded at one tempo into a project at another, and see how many semitones and cents it moves, with 90 to 100 BPM worked through.

·By Sudeep Jain

Type the sample's tempo and your project's tempo into the Sample Pitch Calculator and it tells you two things: how far the pitch moves if you simply speed the sample up or slow it down, and how much faster or slower it plays if you stretch it and keep the pitch. This guide carries one example all the way through, a loop recorded at 90 BPM going into a project at 100 BPM, and shows what to do when the pitch shift lands between two notes.

Two ways to change a loop's tempo

Resampling plays the audio faster or slower, like a turntable or a tape deck. Tempo and pitch move together. Play a loop 11 percent faster and it also sounds higher.

Time-stretching changes the length of the audio and leaves the pitch alone. Wikipedia describes the process as changing the speed or duration of audio without affecting its pitch. It costs some sound quality, because the software has to rebuild the audio. Large stretches sound rougher than small ones.

Samplers and the pitch controls on a clip use resampling. A stretch mode in a DAW uses time-stretching. In the calculator, the "How the sample changes tempo" switch has the same two choices: "Resample" (pitch follows) and "Time-stretch" (pitch stays).

The worked example

The loop is a piano phrase in A minor at 90 BPM. The project is at 100 BPM. Enter 90 as "Sample's tempo", 100 as "Project tempo", and under "Sample's key (optional)" choose A with Scale set to Minor. The library behind the page gives these figures:

  • The ratio is 100 divided by 90, which is 1.1111. The "Playback speed" reads 111.11%, a speed change of +11.11%.
  • "New length" reads 90.00%. A 4-second loop becomes 3.6 seconds.
  • The pitch moves by 12 times the base-2 logarithm of the ratio. That is +1.82 semitones, or +182 cents.

That formula is the heart of the page. A semitone is one twelfth of an octave and an octave doubles the frequency, so a speed ratio of 2 gives +12 semitones, and the ratio 1.0595 gives +1 semitone. The cents figure is the semitone figure times 100.

How the tool splits the shift

Samplers and DAW clips usually give you a coarse control in whole semitones and a fine control in cents. The row "Sampler coarse + fine" rounds to the nearest whole semitone and puts the remainder in cents, so the fine value always stays between -50 and +50. For 90 to 100 BPM it reads +2 st -18 ct. The row has a Copy button that puts "+2 st -18 ct" on your clipboard.

Then the key. The "New key" row moves the tonic by the coarse figure: A minor up two semitones is B minor. The tool adds what is left over, so it reads "B minor, 18 cents flat". It names notes with C, C#, D, Eb, E, F, F#, G, Ab, A, Bb and B, so it spells black keys as sharps or flats in that fixed way. A major key shows as "Eb major", never "D# major".

When a fraction of a semitone matters

Eighteen cents is less than a fifth of a semitone. Wikipedia quotes one author that people can tell apart pitches about 5 to 6 cents apart, and says the threshold varies by person and context. It also says that in harmony very small changes can cause large changes in beats and roughness of chords. Put an out-of-tune piano loop next to a guitar or a synth that sits at standard pitch and you will hear the clash even if each part sounds fine alone.

Two ways out.

Pick a tempo that lands on a whole semitone. The "Tempos that stay in tune" section lists every project tempo from -12 to +12 whole semitones away from the sample's tempo, as long as it falls between 20 and 300 BPM. From 90 BPM the list includes these, rounded to two decimals:

  • +1 semitone is 95.35 BPM.
  • +2 semitones is 101.02 BPM.
  • -1 semitone is 84.95 BPM.
  • -2 semitones is 80.18 BPM.

Click one and it becomes the project tempo. Choose 101.02 and the page reads +2.00 semitones with 0 cents, so the loop lands in B minor, in tune. Your project is now 1.02 BPM faster than you first planned, which most producers can live with. For the 120 to 128 BPM case, where there is no neat tempo near 128, the library gives +1.12 semitones, or +1 st +12 ct, with a new length of 93.75%. A whole-semitone tempo from 120 would be 127.14 BPM for +1, or 134.70 BPM for +2.

Time-stretch instead. If the tempo has to be exactly 100, stretch the loop. Time-stretch mode shows the same +11.11% speed change, and the key row reads "A minor (unchanged)". In your own project, use your editor's stretch mode. On the web, the Pitch Changer has a "Speed (pitch kept)" slider that runs from 50 to 200 percent in whole percents. Set Pitch to 0, load the loop and set Speed to 111, which gives 99.9 BPM from 90. Press Preview to hear the first 30 seconds before you download. For the full explanation of that tool, read how to change pitch without changing speed.

Hearing it before you commit

The "Hear it" panel on the calculator plays a built-in two-bar loop that the page synthesizes in your browser: a kick, a snare, hi-hats and an electric-piano chord in the key you chose, A minor if you set none. The first button plays the loop at the sample's tempo. The second plays it at the project tempo, labeled "resampled" or "stretched" to match the switch. Both loop until you press Stop.

In Resample mode the loop plays at the tempo ratio, and if you change the project tempo while it plays, it follows with a short glide. In Time-stretch mode the page renders the loop again at the new tempo with the pitch unchanged. You can drop in your own file with "Use my own loop". It is decoded on your device and never uploaded, and files over 100 MB are refused. Your own file can only be resampled here. In Time-stretch mode the second button is disabled and a note says to switch to Resample or use the built-in loop.

Common mistakes

  • Swapping the two tempos. "Sample's tempo" is where the audio comes from. "Project tempo" is where it is going. The swap button between the fields flips them.
  • Entering the half-time or double-time tempo for the sample. If you are unsure of the tempo, check it with the BPM Delay Calculator. The guide on how to find the BPM of a song covers tapping and the half-time trap.
  • Resampling a sample whose key you have not checked. The key finder reads it from the file, and the new key row only works as well as the key you give it.
  • Resampling a vocal or a drum loop by several semitones. Everything moves together, including the character of the voice and the weight of the drums. The bigger the shift, the more the character changes, and time-stretch avoids that.
  • Rounding a tempo by hand. 95.35 BPM and 95 BPM differ by about 0.4 percent, which is about 6 cents.
  • Forgetting that the new length is a share of the old one. 90.00% means shorter, so check that your loop markers moved with it.

Sources

More guides