About this tone generator

A small, dependency-free tool for one job: playing an exact frequency through your speakers or headphones, with the nearest note name and cents offset shown alongside it. No account, no upload, and nothing you set here is recorded.

Why it exists

Musicians need a reference pitch to tune against, audio people need a clean test signal to check a speaker or a room, and anyone curious about sound wants to hear the difference between a sine and a square wave at the same frequency. All three needs are the same underlying thing — an exact, adjustable tone — so this page does that one thing directly, with the note-name math worked out for you instead of left as a mental exercise.

How the audio is built

The signal path is a standard Web Audio graph: an OscillatorNode set to the chosen frequency and waveform, feeding a GainNode that controls volume, connected to your device's audio output. Nothing else touches the signal — no compression, no effects, no analysis.

  • The audio engine starts on your click, not on page load. Building an AudioContext before a user gesture — or inside an asynchronous callback that runs after one — risks the browser leaving it suspended under its autoplay policy, which would make Play silently do nothing. It is created (and resumed, if needed) synchronously inside the Play button's own click handler here.
  • Starting and stopping ramps the gain instead of stepping it. Snapping volume straight from 0 to its target (or back) almost always cuts the waveform off mid-cycle, which is heard as a click or pop. This tool ramps gain over roughly fifteen milliseconds on every start, stop and volume change, which is fast enough to feel instant and slow enough to stay silent.
  • A fresh oscillator plays every time. The Web Audio spec makes OscillatorNode one-shot — once stop() is called it can never play again. So a new one is created on every Play and discarded on every Stop, rather than trying to reuse a single node.

How the note-name math was verified

Frequency-to-note conversion was checked against known reference values before shipping:

Verification test vectors and computed results
FrequencyExpectedComputed
440 HzA4, 0¢A4, 0¢
261.626 HzC4, ≈0¢C4, 0¢
466.16 HzA#4, ≈0¢A#4, 0¢

Beyond those fixed vectors, a sweep across the full 20-20,000 Hz range was checked for two invariants that must always hold: the reported cents offset always falls in the half-open window (−50, +50], and converting a note back to a frequency and re-deriving its note name returns the same note. Both held with zero failures. The slider's log-mapping was checked to round-trip frequency → slider position → frequency without drift at both ends of the range (20 Hz and 20,000 Hz) and at intermediate points.

Hearing safety, stated plainly

A pure tone carries none of the natural loudness warning that speech or music gives you, and headphones in particular can reach uncomfortable or harmful levels well before it feels obviously "too loud." The volume slider defaults low and the tool displays a standing reminder to raise it gradually. This is a design choice, not a legal disclaimer dressed up as one: it costs nothing to default quiet, and doing so is the single easiest thing this page can do to reduce the odds of hurting someone's ears or a speaker driver.

Scope and honesty about limits

This plays an exact frequency. It cannot tell you how loud that frequency actually is once it reaches your ears — that depends entirely on your device's volume, amplifier and speakers or headphones, none of which this page can see. It is not a calibrated signal generator, it is not hearing-test equipment, and it is not a substitute for a doctor or audiologist if you have a genuine hearing concern.