Sound Frequency Generator

A pure Web Audio oscillator from 20 Hz to 20 kHz with waveform, volume, and tuning presets — great for tuning instruments, testing speakers, or sound therapy.

Tone Generator Controls

440 Hz
Hz (20–20,000)
25%

Stopped. Browsers require a click to start audio — press Start Tone.

Waveform Preview (2 cycles)

Harmonic Spectrum Hint

Sine = single harmonic at f. Period = 2.27 ms.

Acoustics & the Web Audio API

How frequency, period, and waveform shape the tone you hear — and how the browser renders it on demand.

Frequency, Pitch & Period

Frequency measures how many pressure cycles occur per second, in hertz (Hz). The human hearing range spans roughly 20 Hz to 20 kHz, which is why the slider is bounded to exactly that window. The period — the length of one full cycle — is simply period = 1 / frequency: at 440 Hz each cycle lasts about 2.27 ms. Musical pitch maps to frequency exponentially: A4 is 440 Hz, C4 is 261.63 Hz, and halving or doubling a frequency moves the note an octave down or up. A 432 Hz reference sits just 31.8 cents below A4, a common alternative tuning standard.

Waveforms & Harmonics

A waveform's shape determines its timbre. A sine wave is a single frequency with no harmonics — the purest, softest tone. A square wave adds only odd harmonics at 1/3, 1/5, 1/7… of the fundamental amplitude, giving it a hollow, buzzy character. A sawtooth contains every harmonic at 1/1, 1/2, 1/3…, producing a bright, reedy sound. A triangle wave keeps only the odd harmonics but at 1/9, 1/25…, making it warm and flute-like. The spectrum hint in the tool draws these component bars and lists the first harmonic frequencies so you can reason about what you hear.

Troubleshooting & Edge-Case Failure Points

  • No sound after clicking Start: browsers block audio until a user gesture, so the AudioContext is only created inside the Start button click — clicking elsewhere first still counts, but a fresh page needs that one tap.
  • Audible click/pop on start or stop: the tool ramps gain exponentially over ~30 ms instead of jumping straight to full volume.
  • Out-of-range frequency: the input clamps to 20–20,000 Hz; values outside the audible window are rejected with an error.
  • Hearing safety: volume defaults to a conservative 25% and a warning appears above 80%. Always start at low volume before adjusting up.
  • CPU load: a single oscillator is trivial for any device; stacking many oscillators or long harmonics lists is what costs CPU, so the spectrum preview is theoretical rather than a live FFT.

Step-by-Step Instructions

  1. Set a low volume (the default 25%) before you start — protect your ears and your speakers.
  2. Drag the frequency slider or type an exact value; use a preset for standard tuning references (A4 440, C4 261.63, or 432 Hz).
  3. Choose a waveform; watch the waveform preview and harmonic spectrum hint update to match.
  4. Click "▶ Start Tone" — the AudioContext initializes inside the click, satisfying the browser's autoplay policy.
  5. Adjust frequency and volume live while playing; click "■ Stop Tone" to ramp the gain down smoothly and stop the oscillator.

How to Use the Sound Frequency Generator

Produces exact sine/square/sweep tones in the browser — for speaker tests, hearing checks, room acoustics, and finding rattles.

  1. Pick a frequency (20 Hz–20 kHz spans healthy human hearing).
  2. Choose waveform: sine for pure tests, square for harmonics-rich stress signals.
  3. Start quietly and raise volume gradually — high SPL damages hearing fast.

The Physics You Can Hear

Young healthy hearing spans roughly 20 Hz to 20,000 Hz, and the top falls with age — presbycusis typically erodes 8 kHz+ at ~0.5–1 kHz per decade after 20, which is why adults cannot hear the 17 kHz "mosquito" tones. Useful test points: 60–120 Hz finds room booms and rattles (walk the room — bass nulls and peaks vary wildly by position); 440 Hz is the A4 concert reference; 1 kHz is the calibration standard for loudness. Square waves stack odd harmonics (3f, 5f…) — excellent for spotting resonances, wrong for measuring frequency response. Volume warning is not decoration: sustained tones above ~85 dB cause permanent threshold shift; keep tests short and start low.

Sound Frequency Generator FAQ

What frequency range can humans hear?

About 20 Hz to 20 kHz when young; the top drops roughly 0.5-1 kHz per decade after 20. 17 kHz tones are inaudible to most adults.

Why do I hear tones others can't (or vice versa)?

Age-related high-frequency loss differs by person, plus environmental noise masks low-level tones. Compare on identical volume in a quiet room.

Which frequency tests speakers best?

60-120 Hz sweeps expose rattles and room modes; 1 kHz checks balance. Move around the room - bass response changes sharply by position.