BANDROOM.GAMES
HomeArticles › How pitch detection works

How pitch detection works

Ever wonder how a tuner — or a game that listens to you sing — knows exactly which note you played? It's a clever bit of math, and once you see the idea, it makes total sense. No engineering degree required.

When you play a note, your device's microphone hears a wiggling pressure wave. Pitch detection is the trick of figuring out, from those wiggles, how fast the sound is vibrating — and turning that into a note name like A or F♯. Let's unpack it step by step.

1. Sound is just vibration

Every musical note is air vibrating back and forth. A low note vibrates slowly; a high note vibrates quickly. That speed of vibration is called frequency, and we measure it in hertz (Hz) — the number of full vibrations per second.

The note A above middle C vibrates 440 times a second, so we say it's 440 Hz. Double the frequency to 880 Hz and you get the A one octave higher. That doubling-per-octave relationship is the backbone of how pitch works.

2. The microphone takes thousands of snapshots

Your phone or laptop can't store a smooth wave directly. Instead it samples the sound — measuring the air pressure thousands of times a second (commonly 44,100 times, called the sample rate). Stitch those measurements together and you get a digital picture of the wave, accurate enough to capture every note a human can hear.

3. Find the repeating pattern

A sustained musical note repeats itself: the same wave shape cycles over and over. The core job of pitch detection is to measure how long one cycle takes. If the wave repeats every 1/440th of a second, the pitch is 440 Hz.

Software finds that repeat in a couple of common ways:

  • Autocorrelation — it slides a copy of the wave against itself and looks for the shift where they line up best. That shift is one cycle length.
  • The Fourier transform — it breaks the sound into the pure frequencies it contains and picks out the strongest one (the fundamental).

Both give the same answer: a frequency in hertz.

4. Turn frequency into a note name

Once the app has a frequency, the last step is easy. It compares your number to a table of known note frequencies and picks the closest one — then reports how far off you are in cents (there are 100 cents between neighboring notes). That's exactly what powers the needle on a tuner display… and what lets a game know whether you nailed the target pitch.

See it in action

Glide

Sing to fly — your voice's pitch is the controller. It's pitch detection turned into a game: the higher you sing, the higher you soar. Mic-based and free.

▶ PLAY

5. Why it sometimes glitches

Pitch detection is good, not magic. It can stumble when:

  • The room is noisy — chatter, fans, or other instruments add competing waves.
  • The tone is unstable — breathy attacks, cracks, or heavy vibrato blur the pattern.
  • The note is very low — slow vibrations need a longer sample, so detection lags.
  • An overtone is louder than the fundamental — the app may grab a higher partial by mistake (this is "octave error").

The fix is the same advice that makes tuning easier: play a clean, steady note in a quiet space, and give it a moment to lock on.

6. Why this matters for practice

Understanding pitch detection takes the mystery out of practice apps. When a game says you were a little flat, it's not guessing — it measured your frequency and compared it to the target. That instant, honest feedback is what makes mic-based games such a fast way to build intonation and a sharp ear.

Start now — it's free

Play the arcade

No sign-up, no install. Try a pitch game and feel the technology work in real time.

▶ PLAY FREE

Frequently asked questions

What is pitch, in simple terms?

Pitch is how high or low a sound is, and it comes from how fast the sound wave vibrates. Faster vibration means higher pitch. We measure that speed in hertz (Hz) — cycles per second.

Why does a tuner sometimes jump to the wrong note?

Background noise, breathy or unstable tones, and very low notes can confuse the algorithm. It may lock onto an overtone or a stray sound. Playing a clean, steady note in a quiet room gives the most reliable reading.

Can a phone really detect pitch accurately?

Yes. A phone microphone captures the sound wave thousands of times a second, and the software finds how often the wave repeats. For a clear, steady tone it can measure pitch to within a few cents — plenty for tuning and practice games.


Keep learning: Ear training · Instrument transposition · all guides · more articles