Inside the tuner

How an Online Guitar Tuner Works

Reviewed and updated August 10, 2026

See how a browser turns microphone audio into a detected frequency, finds the nearest musical note, and tells you whether a string is flat or sharp.

An online tuner does not “hear” a note as a person does. It receives a rapidly changing audio waveform, estimates how often that waveform repeats each second, and compares the resulting frequency with a table of musical notes.

Microphone signal
Audio samples
Pitch estimate
Nearest note
Flat / in tune / sharp

1. The browser receives microphone audio

After you grant permission, the browser’s Web Audio API creates a live audio stream. Guitar-Tuner.org analyses that stream locally. The tuner does not need to upload or store a recording in order to estimate pitch.

Audio is represented as a sequence of sample values. Instead of inspecting an endless stream at once, the tuner works with short blocks. This site currently uses blocks of 4,096 samples: long enough to reveal repeating low-frequency guitar waves while remaining responsive.

2. Pitch detection finds repetition

A stable musical sound repeats in a roughly periodic way. If one cycle repeats 110 times per second, the fundamental frequency is 110 Hz — the target frequency for A2. Real strings also produce harmonics at multiples of that fundamental, which give an instrument its tone and make pitch detection more challenging than simply locating the loudest frequency.

Guitar-Tuner.org uses the Aubio audio analysis library to estimate pitch. It also rejects readings that are too quiet, outside the instrument range, or unstable across consecutive analysis windows. This reduces jumps caused by room noise and the sharp transient at the instant a string is plucked.

Example: detecting the open A string

Suppose three stable analysis windows estimate 109.7, 109.9, and 109.8 Hz. The measurements are close together, so the tuner accepts the signal and compares approximately 109.8 Hz with the target notes. A2 at 110 Hz is the nearest match.

3. Frequency becomes a musical note

Notes in equal temperament follow a logarithmic pattern. Each step of one semitone multiplies frequency by the twelfth root of two. The tuner can calculate the nearest note relative to A4 = 440 Hz using:

note distance = 12 × log₂(measured frequency ÷ 440)

Rounding that distance to the nearest whole semitone identifies the closest note; the remaining fraction becomes the tuning error.

4. Cents describe the remaining error

The closest note name is only part of the answer. A string at 109.8 Hz and one at 111 Hz may both be identified as A2, but the first is slightly flat and the second is sharp. Cents express that distance consistently:

cents = 1200 × log₂(measured frequency ÷ target frequency)

A2 measurementDifferenceInstruction
109.0 Hzabout −16 centsTighten the string
110.0 Hz0 centsIn tune
111.0 Hzabout +16 centsLoosen the string

Why a tuner display sometimes jumps

  • The attack is sharp: a hard pluck temporarily stretches the string.
  • Harmonics dominate: the detector briefly locks onto an overtone instead of the fundamental.
  • Several sounds overlap: other strings or room noise create competing periodic signals.
  • The signal is weak: distance from the microphone makes the note difficult to distinguish from noise.
  • The note is decaying: as volume falls, the estimate becomes less stable.

How to give the tuner a clean signal

  1. Mute the strings you are not tuning.
  2. Place the instrument reasonably close to the microphone.
  3. Pluck once with moderate force and let the note ring.
  4. Wait a fraction of a second for the attack to settle.
  5. Make small adjustments and pluck again rather than turning the peg continuously.

Microphone mode versus tuning by ear

Microphone mode measures pitch and is the quickest option when you need an objective target. By-ear mode plays a reference note but leaves the comparison to you. Practising by ear can improve pitch awareness, while automatic mode is better for checking precise intonation before playing.

Frequently asked questions

Does the tuner send microphone audio to a server?

No. Pitch analysis for this tuner happens inside your browser. Your browser still controls microphone permission, which you can remove in its site settings.

Why does the tuner show the wrong string?

The string may be far from its target, or the detector may be following a strong harmonic. Select the intended string manually, mute the others, and compare the displayed octave and frequency with the expected target.