LISTEN · MEASURE · UNDERSTAND

How Browser Pitch Detection Works

Follow browser pitch detection from capture to frames, fundamental frequency, note mapping and display. Learn why estimates can lag.

Browser pitch detection turns audio samples into an estimated frequency, then maps that result to a note and cents. A live tool opens the microphone with permission, collects short audio windows and runs a pitch estimator. The display updates as accepted results arrive. The quality depends on the input and what each stage does.

Capture a Microphone Stream or Read a File

The browser opens a microphone after the user starts the feature and allows access. The actual input can depend on browser and device settings. A file workflow can decode selected audio without opening the microphone. Both produce audio samples with a stated processing rate.

For a focused comparison, use the microphone or file pitch analysis: choose the evidence workflow. Keep the original source and relevant settings so a new observation remains distinguishable from an interpretation or calculation.

Inputs include room sound and any device processing. A recording may also carry earlier edits. Read mobile capture and microphone access to resolve permission issues or measuring a selected file interval if you are using a recording.

Build Frames and Advance by the Hop

A frame is a short set of samples sent to the estimator. A hop is how far the starting position advances to the next frame. When the hop is shorter than the window, adjacent frames overlap. They can produce closely spaced measurements from audio that shares some of the same time.

For example, 3,072 samples at 48 kHz cover 64 milliseconds. A hop of 480 samples advances 10 milliseconds. The window duration affects how much signal supports each estimate. The hop affects how often a new frame is evaluated. A displayed measurement can be updated at a separate rate.

Stage Output it provides
Capture or decode Samples at a known rate
Divide into frames Audio windows with times
Estimate periodicity Candidate frequency or an uncertain interval
Map to the reference Note, octave and cents
Update the interface Live values, trace and status

Where the Delay Comes From

The first estimate needs enough samples to fill a frame. Processing and interface rendering add time. A smoothing rule can make the readout easier to follow and can also lag a quick slide. Compare the timestamp and the audible change before interpreting the apparent delay.

Estimate the Fundamental Frequency

A periodicity estimator looks for a delay that fits a repeated pattern. Autocorrelation methods compare similarity, and YIN uses a difference function. The YIN versus autocorrelation guide explains the candidate rules in more detail. A detector can reject a frame if it lacks enough reliable period evidence.

A spectrum may also be computed for frequency components. That is a separate representation. A largest peak can be a harmonic. Read FFT and strongest frequency to understand why it can differ from the period-based estimate.

Map F0 to a Note, Octave and Cents

The estimated Hz is compared against a reference grid. The tool can show the nearest equal-tempered note and how far the estimate sits above or below it. Changing A4 can alter those labels while the already measured frequency remains the same. See the Hz-to-note formula for the conversion.

Use the browser pitch identifier to see frequency, note and cents on a single steady sound. Look for an accepted interval and note what happens at the start and end. The pitch result guide explains why labels can change near a note boundary.

Keep the Interface Responsive and End Capture Cleanly

A browser tool can perform analysis away from the main display thread when its architecture allows it. That can help keep controls responsive. An implementation still needs a clear way to stop capture or cancel a file job and ignore results from that cancelled task.

Stopping capture and a saved browser permission are separate. The browser may remember access after a session stops. Use its site setting to review future permission. Check the release behavior if audio handling is important to the way you plan to use the tool.

Compare Timing on the Same Signal

Measure a recording of two clear notes in different tools. Match the analyzed interval and record when each trace changes. Use the known audio transition as your timing reference. A quicker redraw may update the screen often and still use overlapping frames that include some of the earlier note.

For a file-based comparison, check whether the displayed timestamps are relative to the selected segment or the full recording. Two analysis runs can describe the same transition at different displayed times if the selection changed. Keep the original audio position alongside the trace before comparing any apparent delay.

Frequently Asked Questions

Why is my browser pitch result delayed?

The detector needs enough samples, time to estimate a candidate and time to display it. Larger windows or smoothing can make changes appear later.

Does microphone access tell me whether a tool uploads audio?

Permission allows the browser to open the input. Where processing occurs is an implementation choice. Read the released tool’s data handling description.

Why does the browser show a gap for a sound I can hear?

An audible sound may be noise, a transient or several competing pitches. A pitch estimate needs a useful repeating pattern. A gap can preserve the uncertainty.