Tone Generator

Professional‑grade signal generator for acoustics, hearing tests, instrument tuning, and sound experimentation. Real‑time frequency control from 1 Hz to 20 kHz, adjustable volume, and live waveform visualizer.

Sine
Square
Sawtooth
Triangle
Different waveforms produce different harmonic content and timbre.
Frequency 440 Hz
Human hearing range: 20 Hz (low) to 20,000 Hz (high). 440 Hz is concert A pitch.
20 Hz (Low)
60 Hz (Hum)
440 Hz (A4)
1 kHz
5 kHz
10 kHz
15 kHz
20 kHz (High)
Volume 70%
Adjust volume carefully to protect your hearing. Start low and increase gradually.
Hearing safety: Start with low volume (≤20%) and avoid prolonged exposure to high frequencies above 85 dB. This tool generates continuous sine waves – reduce volume before wearing headphones.
Ready to generate tone
Frequency: 440 Hz
Waveform: Sine
Volume: 70%
Dial Tone (350+440 Hz)
Ring Tone (440+480 Hz)
Beep (800 Hz)
Alert (1000 Hz)
Low A (220 Hz)
Concert A (440 Hz)
High E (1318.5 Hz)
Ultrasonic (18,000 Hz)

Real-time Calculations

Period (T)
2.27 ms
Angular Frequency (ω)
2764.6 rad/s
Wavelength in Air (λ)
0.78 m
Harmonic Series
1f, 2f, 3f...
Note Name
A4
Cents from A440
0 cents

The Science of Pure Tones: From Sine Waves to Psychoacoustics

An audio tone generator produces a continuous electronic signal at a specific frequency and waveform. A pure sine wave, mathematically described as y(t) = A·sin(2πft+φ), represents the simplest periodic oscillation—containing only the fundamental frequency with no harmonics. Square, triangle, and sawtooth waves introduce specific harmonic overtones and are fundamental in sound synthesis, electronic testing, and acoustic research. This tool leverages the Web Audio API’s OscillatorNode, offering sub‑millisecond timing precision and 32‑bit floating‑point gain control.

Frequency, Pitch, & Human Hearing

Frequency, measured in Hertz (Hz), determines the perceived pitch. The human auditory system, centered on the cochlea, converts sound pressure waves into neural signals via tonotopic mapping—different frequencies stimulate specific regions along the basilar membrane. Young, healthy hearing typically ranges from 20 Hz (low rumble) to 20 kHz (high pitch), with peak sensitivity between 2–5 kHz. Concert pitch A4 is 440 Hz.

Waveforms & Harmonic Content

Sine: Fundamental only → pure, mellow tone. Square: Odd‑numbered harmonics (1f, 3f, 5f...) → bright, hollow. Triangle: Odd harmonics with amplitudes diminishing as 1/n² → smooth, flute‑like. Sawtooth: All integer harmonics (1f, 2f, 3f...) → rich, brassy. These waveforms form the basis of subtractive synthesis (Moog, ARP).

Acoustic Units & Perception: Loudness perception uses the logarithmic decibel (dB) scale. A 10 dB increase approximates a doubling of perceived loudness. This tool’s gain control is linear (0‑100%). The actual Sound Pressure Level (SPL) output depends on your device’s digital‑to‑analog converter (DAC) and amplification. The Fletcher‑Munson curves (equal‑loudness contours) illustrate that human hearing is less sensitive at very low and very high frequencies.

Practical Applications

  • Hearing Tests & Tinnitus Management: Audiologists use calibrated pure tones for threshold audiometry. Some therapeutic approaches use tinnitus‑matching frequencies.
  • Speaker, Headphone & Room Analysis: Sweep frequencies to identify resonances, rattles, or anomalies in frequency response. Detect room modes and standing waves.
  • Musical Instrument Tuning & Ear Training: Generate reference pitches (A=440 Hz, C4=261.6 Hz) for precise tuning and developing relative pitch.
  • Clinical & Industrial Diagnostics: Used in cochlear implant mapping (MAPping) and in non‑destructive testing via acoustic emission analysis.
  • Science & Engineering Education: Demonstrate waveform shapes, harmonic series, beat frequencies, and foundational principles of Fourier synthesis.

How the Audio Engine Works (Web Audio API)

Clicking “Play Tone” triggers the browser to create or resume an AudioContext (initial state is often suspended due to autoplay policies). An OscillatorNode is instantiated, configured with the selected waveform type and frequency, and connected to a GainNode for volume control. The gain node finally connects to the AudioDestinationNode (your speakers or headphones). The oscillator provides a steady, phase‑continuous, and drift‑free tone until stopped. The visual waveform is drawn independently using JavaScript’s requestAnimationFrame loop, simulating an oscilloscope view synchronized to the current settings. All digital audio processing occurs at the internal sample rate (typically 44.1 kHz or 48 kHz).

Latency & Performance: Web Audio is hardware‑accelerated, offering typical output latency below 10 ms. Frequency changes are applied in real‑time, maintaining phase to avoid audible clicks or pops.

Case Study: Using the Tone Generator for Subwoofer Calibration

A home theater enthusiast used a slow frequency sweep with a sawtooth wave (rich in harmonics) from 30 Hz to 120 Hz to excite room modes. A pronounced null at 63 Hz was identified, indicating a standing wave caused by room dimensions. Repositioning the subwoofer away from the wall reduced this dip by approximately 12 dB, resulting in a smoother bass response. The precision and stability of the browser‑based digital oscillator eliminated the variability often encountered with test tones from physical media.

Step‑by‑Step Usage Guide

  1. Start Safely: Set the volume slider to 10–20% before playback, especially with headphones.
  2. Select Waveform: Choose Sine (pure tone), Square (edgy), Triangle (smooth), or Sawtooth (bright, rich).
  3. Adjust Frequency: Use the slider or type directly into the numeric field (1 Hz – 20,000 Hz). Common references: 440 Hz (A4), 1000 Hz (standard hearing test), 50/60 Hz (mains hum).
  4. Play/Stop: Click “Play Tone” to start generation. The “Stop” button halts the oscillator and releases audio resources.
  5. Observe Waveform: The canvas displays a real‑time approximation of the generated signal’s shape.

Tone Generator vs. Hardware Function Generator: Technical Specifications

Parameter Web Audio Tone Generator Hardware Function Generator
Frequency Range 1 – 20,000 Hz (audible spectrum) µHz to MHz+
Frequency Accuracy Very high (±1 cent relative), based on system clock Extremely high (±0.1 ppm typical with TCXO/OCXO)
Distortion (THD) ~0.01% (depends on browser/OS audio stack) As low as 0.001% (high‑end models)
Amplitude Control Linear gain 0…1 (32‑bit float) Precision analog or high‑resolution DAC (14‑bit to 24‑bit)
Portability & Cost Any modern browser, no installation, free Benchtop equipment, requires purchase
Waveforms Sine, Square, Triangle, Sawtooth (standard types) Plus Arbitrary, Pulse, Noise, AM/FM modulation

Frequently Asked Questions

Modern browsers enforce an autoplay policy that requires a user gesture (click, tap, key press) to start audio playback. This prevents websites from automatically playing sounds, which can be disruptive. After the initial activation, the AudioContext remains active, allowing for continuous playback and real‑time parameter changes.

The Web Audio API OscillatorNode technically supports frequencies up to the Nyquist limit (half the sample rate). For a standard 44.1 kHz sample rate, this is about 22.05 kHz. You can set frequencies up to ~22,000 Hz. However, most consumer speakers and headphones cannot reproduce sounds above 20 kHz, and human hearing generally does not perceive them. Frequencies in the 20–22 kHz range may be used for applications like dog training or certain ultrasonic experiments, but their effectiveness depends entirely on your hardware's capabilities.

The Web Audio oscillator provides excellent frequency accuracy and low distortion suitable for listening tests, tuning, education, and general‑purpose analysis. For critical laboratory measurements requiring traceable calibration—such as measuring Total Harmonic Distortion (THD), Intermodulation Distortion (IMD), or absolute Sound Pressure Level (SPL)—a dedicated, calibrated sound card paired with measurement software (like ARTA, REW) is recommended. The browser's audio output is subject to the final analog stage of your device's sound card.

Yes, through system audio loopback. You can use virtual audio cable software (e.g., VB‑Cable on Windows, Soundflower/BlackHole on macOS, Loopback on both) to route your browser's audio output to the input of a Digital Audio Workstation (DAW) or audio analyzer. Alternatively, you can use your operating system's screen/audio recording feature to capture the tone.

Sine waves are the standard for pure‑tone audiometry because they stimulate a very narrow, specific region on the cochlea, allowing for precise threshold measurement at a single frequency. Square waves contain many odd harmonics, which stimulate a broader area of the basilar membrane. This makes them less precise for diagnostic threshold testing but potentially useful for other purposes like masking or gross hearing checks.

There can be minor variations due to several factors: the quality of the device's Digital‑to‑Analog Converter (DAC) and amplifier, the operating system's audio processing stack (Windows Audio, Core Audio, ALSA/PulseAudio), and the specific browser's implementation of the Web Audio API. For comparative listening (e.g., checking left/right balance), use the same device and settings. For absolute measurements, device‑specific calibration is necessary.

The 20 kHz limit is based on the Nyquist‑Shannon sampling theorem and human auditory physiology. Standard audio CD quality uses a 44.1 kHz samplge rate, allowing perfect reconstruction of signals up to 22.05 kHz. The 20 kHz limit is a conservative practical upper bound that accounts for the roll‑off of anti‑aliasing filters and the fact that few adults can hear above 18‑20 kHz. Frequencies above half the sample rate cause aliasing, creating audible artifacts. The Web Audio API manages this internally to prevent aliasing in the generated signal.
References: Web Audio API W3C Specification; ANSI/ASA S3.6‑2010 (Specifications for Audiometers); Safety guidelines from the American Academy of Audiology and WHO on noise‑induced hearing loss. Implementation reviewed for technical accuracy by the GetZenQuery Tech, April 2026.