Sample Pitch and Rate Calculator

Transposing a sample without time-stretching changes three things at once: its pitch, its playback rate and its length. This works out all three, and tells you what a sample-rate mismatch costs you in semitones.

Assumes plain resampling — the behaviour of Simpler and Sampler in Classic mode, and of any sampler with time-stretching switched off. A stretching algorithm holds the length and breaks this relationship on purpose.

Playback rate
1.0000×
New length
2000.0ms
New tempo
120.0BPM
Transposition table · click a value to copy
ShiftRateLengthLength at 2000 msTempo at 120 BPM

Why the length moves

Resampling plays the same audio data faster or slower. Up an octave means reading the file at twice the rate, so it finishes in half the time; down an octave doubles its length. There is no way to raise the pitch this way and keep the duration — that is precisely the job time-stretching exists to do, and it costs artefacts in exchange.

For loops this is usually a feature rather than a problem. A break repitched down three semitones lands at a slower tempo with the weight that comes with it, which is a large part of why so much music built on repitched breaks sounds the way it does.

Sample-rate mismatch

Playing a file at the wrong sample rate is the same arithmetic wearing a different hat. The ratio between the two rates is the playback rate, and the pitch shift follows from it:

This is what has happened when an imported file sounds slightly sharp and slightly short for no obvious reason. It is a rate mismatch, not a tuning error, and the fix is to convert the file properly rather than to transpose it back.

The arithmetic

Playback rate is 2^(semitones ÷ 12), with cents folded in as hundredths of a semitone. New length is the original divided by that rate; new tempo is the original multiplied by it. Twelve semitones gives exactly 2, which is the definition of an octave.

Related

Auspicious Music is an independent publication on a domain with an earlier history. The former operator is not involved in the current site.

Read the history and relaunch note