1. Home
  2. Audio & video tools
  3. Sample Pitch & Time-Stretch Calculator

Sample Pitch & Time-Stretch Calculator

Work out how a change of speed moves the pitch, how far a sample must be shifted to match a tempo, and what a wrong sample rate does.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use Sample Pitch & Time-Stretch Calculator

  1. Choose a pitch shift, a tempo change or a sample-rate mismatch.
  2. Enter the values.
  3. Read the speed, semitones, cents and new length.

Features

  • Semitones to playback ratio and back
  • BPM to BPM matching with the pitch change it causes
  • Sample-rate mismatch (for example 44.1 played at 48 kHz)
  • New length and tempo of a loop
  • Formulas shown

Supported formats

Input

  • Typed settings

You get

  • Calculated figures

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Sample Pitch & Time-Stretch Calculator is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Shows the maths of varispeed playback; it does not process audio.

Guide

Pitch, speed and length of a sample: semitones, tempo changes and sample-rate mismatches

Playing a recording faster makes it higher and shorter. Playing it slower makes it lower and longer. That is how a turntable, a tape machine and the keyboard of a sampler behave, and it is the idea behind many hip-hop and electronic production tricks. The numbers that connect pitch, speed, tempo and length all follow from one formula, which this calculator applies in three directions.

The formula

Each semitone multiplies the speed by the twelfth root of two, about 1.05946. For n semitones the ratio is 2^(n/12). Going the other way, semitones = 12 × log2(ratio). A ratio of 2 is twelve semitones up, one octave, and a ratio of 0.5 is an octave down. Length is divided by the ratio, and a tempo is multiplied by it.

A worked example

Start with a pitch shift of +3 semitones. The ratio is 1.1892, so the sample plays at 118.9207 percent of its original speed. A 4-second sample becomes 3.3636 seconds long, and a 100 BPM loop becomes 118.9207 BPM. To get the same length back without the pitch change you would need to time-stretch by a factor of 0.8409, which is 1 divided by the ratio. Start instead from a tempo change of 100 to 120 BPM and the ratio is 1.2, which is 3.16 semitones, so speeding up a drum loop to match a track also moves it up a little over three semitones.

Three starting points

A pitch shift is the direct way: type the number of semitones, negative for down, from -48 to 48. A tempo change asks for the original and the target tempo and tells you how many semitones the pitch will move if you simply speed the sample up, which is why sampled loops are often matched by a time-stretch instead. A sample-rate mismatch handles a common error: a file recorded at one rate and played at another. A file at 44,100 Hz played at 48,000 Hz runs 8.84 percent fast and sounds about 1.47 semitones sharp.

Varispeed and time-stretching

Varispeed changes pitch and length together. A time-stretch algorithm changes one without the other, by cutting the audio into small pieces and overlapping them, as the Audio Speed Changer does. Each approach has artefacts. Varispeed sounds natural for moderate changes but alters the character of voices; stretching can add a slight smearing of transients. The page tells you the stretch that would hold the pitch constant, so you can choose.

Practical uses

Match a sample to a song in another key by shifting it the number of semitones between the keys. Slow a recording down by 12 semitones to hear a fast passage an octave lower, the old trick for working out a solo by ear. Check how far a tape-speed error shifted a recording. Calculate what a pitch-up control on a record deck does to a track’s tempo.

Edge cases

The formula is exact, but real devices round: a sampler may offer steps of a cent, or a turntable a percentage. A whole-percent pitch fader gives uneven semitone steps, since 8 percent is 1.33 semitones and not a neat number. For very large changes, high-frequency content can leave the audible band or alias.

Limits

It performs arithmetic and does not process audio. It cannot estimate formant shift. Values are shown to four decimal places.

Checked against the current version of the Sample Pitch & Time-Stretch Calculator on .

Frequently asked questions

How many semitones is a change of 8 percent in speed?

About 1.33 semitones. The conversion is 12 times log base 2 of 1.08. Small percentage changes are close to a semitone for every 6 percent, but the exact formula is multiplicative, not additive.

Why does pitching a vocal up make it sound like a chipmunk?

Speeding the recording shifts the pitch and also every resonance of the voice, the formants, which tell the ear about the size of the throat. A time-stretch with formant control moves the pitch while keeping a natural character.

How many semitones is a 10% speed increase?

About 1.65 semitones. The pitch change is 12 times the base-2 logarithm of the speed ratio, so 1.10 gives 1.65 semitones, roughly 165 cents.

Why does a file sound high and fast when played at the wrong rate?

The samples are played faster than they were recorded. A 44.1 kHz file played at 48 kHz is sped up by about 8.8% and sounds about 1.5 semitones higher.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.