Sample Pitch Shift Calculator
When you transpose an audio sample by changing its playback speed, pitch and duration move together: pitching up makes it shorter and brighter, pitching down makes it longer and lower. The factor is the equal-temperament ratio, two raised to the semitone shift over twelve. This calculator takes a shift in semitones, the original sample duration, and the original sample rate, and returns the speed ratio, the new duration, the effective playback sample rate, and the shift in cents. Use it to fit a sample to a target pitch, plan resampling, or understand how much a time-stretch engine must compensate to hold the length.
Pitch shift formula
Speed ratio = 2^(semitones / 12)
New duration = original duration / speed ratio
Effective playback rate = original sample rate * speed ratio
Cents = 100 * semitones
This is the varispeed relationship where pitch and speed are linked. Pitching up gives a ratio above 1 (shorter, higher); pitching down gives a ratio below 1 (longer, lower).
Sampling context
- Pitching up an octave doubles the rate and halves the duration.
- A perfect fifth up (7 semitones) gives a ratio of about 1.498.
- Time-stretching transposes without changing length by undoing this speed change.
- The effective playback rate sets how much resampling is needed to hold a fixed output rate.
- Express the target as semitones plus cents to hit a precise pitch.
Sample pitch shift: frequently asked questions
What happens when I pitch a sample by varispeed?
Classic varispeed pitch shifting changes the playback rate, so pitch and speed move together. Pitching up n semitones multiplies the playback rate by two raised to n over twelve, which raises the pitch and shortens the sample by the same factor. Pitching down lengthens it.
How much does the duration change?
The new duration is the original duration divided by the speed ratio. Pitching up an octave (twelve semitones) doubles the playback rate, so the sample plays in half the time. Pitching down an octave halves the rate and doubles the length.
What is the difference from time-stretching?
Time-stretching algorithms change pitch and duration independently, so you can transpose without altering length. This calculator models the simple varispeed relationship where pitch and speed are linked, which also tells you the playback-rate factor a time-stretch engine must correct for.
What new sample rate does pitching imply?
If you pitch by changing playback rate, the effective sample rate the audio plays back at is the original rate times the speed ratio. To keep a fixed output rate, the audio is resampled, but the ratio here is what determines how much resampling is needed.
Why use semitones and cents?
Musical pitch is logarithmic, so equal musical steps are equal frequency ratios. Expressing the shift in semitones and cents lets you transpose a sample to a target note precisely. One hundred cents make a semitone and twelve semitones make an octave.
Official sources
- UNSW School of Physics: Note names, MIDI numbers and frequencies.
- UNSW School of Physics: Music acoustics.
Reviewed by the CalculatorHub team, edited by James Graham, 17 June 2026. See our methodology.