Guide

How pitch-shifting changes a sample’s key

Shift a loop by anything other than whole semitones and it stops sitting on the grid — which is exactly where most key detection quietly fails.

Published 6 min read

Two cases, and they behave nothing alike

Whole semitones

Shift a loop up 3 semitones and its key moves up 3 semitones. A minor becomes C minor. The mode is unchanged and every interval is preserved, so the material still sits on the twelve-tone grid and any detector handles it.

Worth knowing: +1 semitone is +7 positions on the Camelot wheel, which is why a single semitone can move a sample from harmonically compatible to harmonically distant in one step.

Anything else

Shift by +50 cents, or time-stretch with pitch linked, or resample by an arbitrary ratio, and the sample no longer sits on the grid at all. It is not in A minor and it is not in B♭ minor. It is between them.

That is where key detection starts producing confident nonsense.

Why it goes wrong

Key detection measures how much energy sits at each of the twelve pitch classes. Deciding which class a given frequency belongs to requires a reference pitch — almost always A = 440 Hz.

For material 40 cents flat, every note sits near a boundary. The energy splits across two classes. The resulting picture is a smeared version of the real one, and the winning key is frequently the neighbour rather than the right answer.

Nothing in the output indicates this happened. You get a key, in a confident font.

Where detuned material comes from

More places than people expect:

  • Pitch-shifted samples, obviously.
  • Time-stretched material where pitch was linked to rate.
  • Sample packs recorded, resampled or bounced off concert pitch. Extremely common.
  • Vinyl rips — a turntable running at 33.5 instead of 33⅓ shifts everything.
  • Tape sources, for the same reason.
  • Instruments deliberately tuned elsewhere. A = 432 is 32 cents flat and there is a whole subculture around it.
  • Old hardware samplers with imprecise resampling.

If your library contains sampled or pack material, a meaningful share of it is off pitch.

How to spot it

1. Use something that measures tuning

The direct approach. A tool that works out the tuning offset first and corrects for it handles detuned material properly — and, if it is being straight with you, tells you the offset it found.

DropWave measures it, corrects for it, and reports the deviation in cents. A reading of "A minor, measured at −38 ¢" gives you the key and the fact that the file is a third of a semitone flat. That second number is usually the more actionable one.

2. Tune a reference against it

By ear, free, and unambiguous:

  1. Loop the sample.
  2. Play a sustained sine or simple tone at the note you believe is the tonic.
  3. Listen for beating — the slow wobble two close pitches make together.
  4. Detune your tone until the beating stops. The amount you moved is the sample's offset.

Slower than reading a number, but it works with nothing installed.

3. Watch a tuner

Feed a sustained pitched section into a tuner plugin. If it consistently reads a fixed number of cents off across different notes, that is a global tuning offset rather than a performance.

What to do about it

Once you know the offset, three options:

Correct it. Pitch the sample by the measured amount — up 38 cents in the example above — and it sits on the grid. Everything downstream behaves normally.

Pull the session to it. If the detuned sample is the centrepiece, retune everything else instead. Most instruments have a master tune in cents.

Leave it. Detuning between layers is not automatically a problem — it is how a lot of records get their thickness. It becomes a problem only when something has to be in tune with the sample, which is when you need the number.

The knock-on effect

Because the Camelot code comes from the key, a wrong key gives a wrong code, and the harmonic-mixing rule then points at the wrong three positions.

If you file a library by Camelot code, this compounds: every detuned file is misfiled, and you find out when something clashes in a set.

DropWave is in closed beta

The Discord is the only way in. Builds are posted there, access is handed out there, and it is where you tell us when something reads wrong. There is no download on this site.

macOS 13 or later · Apple silicon & Intel · your audio never leaves your Mac