Tone Generator

Generate precise audio tones from 20 Hz to 20,000 Hz directly in your browser. Choose from sine, square, triangle, and sawtooth waveforms. Use dual-tone mode to layer two frequencies, or sweep across a range for speaker and hearing tests. Real-time oscilloscope and spectrum visualization included — all processed locally, no data uploaded.

Tone Generator Tool

Click “Play Tone” to begin
440
Hz
A4
Waveform
20 Hz2002k20k Hz
Frequency Spectrum
⊕ Dual-Tone Mode
Tone 2: C#5 — 554.37 Hz
↗ Frequency Sweep Mode
🎧 Stereo Panning (L/R)
L R
Center
🎵 ADSR Envelope
🔊 Noise Generator
💾 WAV Export

Renders with current frequency, waveform, volume & ADSR settings. 44.1 kHz / 16-bit.

🎹 Interactive Piano

Click keys to play notes — uses current waveform & volume settings

🧪 Hearing Range Test

Test your hearing range across 17 frequencies from 125 Hz to 20 kHz

Press Start to begin the hearing test

How to Use the Tone Generator

  1. Set Your Frequency

    Use the frequency slider, type an exact value in the Exact Hz box, select a Musical Note from the dropdown, or use Quick Presets for common frequencies (440 Hz, 1 kHz, 432 Hz). You can also click keys on the Interactive Piano below the widget to play specific notes instantly.

  2. Choose a Waveform & Adjust Volume

    Select from Sine (pure tone), Square (bright, buzzy), Triangle (mellow), or Sawtooth (rich harmonics). Set a comfortable volume, then click “Play Tone”. The circular gauge, oscilloscope, and spectrum analyzer update in real time. ⚠️ Start at low volume.

  3. Shape Your Sound with ADSR

    Open the ADSR Envelope panel to control how your tone fades in and out. Adjust Attack (fade-in time), Decay (drop after peak), Sustain (held level), and Release (fade-out time). A visual curve shows the exact envelope shape. This turns the tool into a real synthesizer.

  4. Pan, Layer & Add Noise

    Use Stereo Panning to send audio to the left or right channel. Enable Dual-Tone Mode to layer two independent oscillators. Turn on White, Pink, or Brown Noise to layer ambient noise on top of your tones — great for masking, sleep, or speaker testing.

  5. Test Your Hearing

    Scroll to the Hearing Range Test section and click “Start Test”. The tool plays 17 frequencies from 125 Hz to 20 kHz. Press “I Can Hear It” or “Can’t Hear It” for each. When done, a color-coded bar chart shows your audible range with a personalized rating.

  6. Export & Download

    Open the WAV Export panel, set a duration (0.5 – 30 seconds), and click “Download WAV”. The tool renders your tone offline with all current settings (frequency, waveform, volume, ADSR envelope) and saves a 44.1 kHz / 16-bit WAV file — perfect for testing, sound design, or ringtones.

Understanding Your Output

Circular Gauge & Musical Note

The large green number inside the circular gauge shows the current frequency in Hz (Hertz — cycles per second). The glowing arc fills proportionally on a logarithmic scale from 20 Hz to 20 kHz. Below, the nearest musical note is displayed (e.g., A4, C5, G#3), making the tool useful for tuning instruments or generating reference tones.

Waveform Types

Each waveform has different harmonic content:

  • Sine — pure tone, single frequency, no harmonics. The fundamental building block of all sound.
  • Square — contains odd harmonics (3rd, 5th, 7th), producing a bright, buzzy, retro sound.
  • Triangle — also odd harmonics but with much lower amplitude, creating a softer, mellower tone.
  • Sawtooth — contains all harmonics (odd and even), producing the richest, most complex sound.

ADSR Envelope Shape

The ADSR canvas shows a visual representation of how your tone’s volume changes over time. Attack is the ramp from silence to peak volume. Decay is the drop from peak to the sustain level. Sustain is the steady-state level held while the tone plays. Release is the fade-out after you stop. This shapes the “character” of the sound — a long attack creates a swell, while a short attack creates a percussive hit.

Stereo Panning

The pan slider controls audio placement between your left and right speakers or headphone channels. Center sends equal volume to both. Moving toward L or R progressively reduces volume in the opposite channel. This is useful for stereo speaker testing, verifying headphone balance, or creating spatial audio effects.

Noise Types

Three noise colors are available, each with distinct spectral characteristics:

  • White Noise — equal energy at every frequency. Sounds like TV static. Used for acoustic measurements and masking.
  • Pink Noise — energy decreases at 3 dB per octave. Sounds balanced across frequencies. Used for speaker calibration and sleep.
  • Brown Noise — energy decreases at 6 dB per octave. Deep, rumbling sound. Popular for focus and relaxation.

dB Level Meter

The vertical VU meter shows the real-time output level in decibels (dB). Green indicates safe levels, yellow indicates moderate levels, and red indicates high levels. The red peak hold line marks the highest level reached in the last 2 seconds, helping you monitor peaks without constantly watching the meter.

Interactive Piano

The 3-octave piano keyboard (C3–B5) lets you click keys to play notes using the current waveform and volume settings. White keys play natural notes, black keys play sharps/flats. Each key shows its note name, and when pressed, the circular gauge and frequency display update to show the exact Hz value.

Hearing Test Results

After completing the hearing test, a color-coded bar chart displays your results. Green bars indicate frequencies you heard; red bars indicate frequencies you could not hear. The highest green bar represents your upper hearing limit. Typical results: young adults hear up to 16–18 kHz; adults over 40 typically reach 12–14 kHz.

WAV Export

The WAV Export renders your tone offline using an OfflineAudioContext, capturing all current settings (frequency, waveform, volume, and ADSR envelope). The resulting file is a standard 44.1 kHz, 16-bit PCM WAV — universally compatible with audio editors, DAWs, video editors, and media players.

How the Tone Generator Works

Web Audio API Architecture

This tool uses the Web Audio API — the browser’s built-in audio processing engine. The full signal path is: OscillatorNodeGainNode (volume + ADSR control) → StereoPannerNode (L/R panning) → AnalyserNode (oscilloscope + spectrum + dB) → AudioContext.destination (your speakers). Noise generators use AudioBufferSourceNode with pre-computed buffers connected to the same chain.

ADSR Implementation

Envelope shaping uses the GainNode’s linearRampToValueAtTime() method to schedule precise amplitude changes. Attack ramps from 0 to peak, Decay ramps from peak to sustain level, Sustain holds the level, and Release ramps from sustain to 0. All transitions are sample-accurate, scheduled on the audio thread for glitch-free playback.

Noise Generation

White noise is generated by filling an AudioBuffer with uniform random values. Pink noise uses the Voss-McCartney algorithm with 7 rows of filtered random values to achieve the characteristic -3 dB/octave rolloff. Brown noise (Brownian motion) accumulates random values with a leaky integrator, producing the -6 dB/octave spectrum. All buffers are 2 seconds long and loop seamlessly.

WAV Export Process

The WAV download uses an OfflineAudioContext to render audio without real-time playback. The oscillator and gain nodes are configured identically to the live signal path, including ADSR envelope scheduling. The rendered AudioBuffer is then converted to a 16-bit PCM WAV file using manual DataView byte writing with proper RIFF/WAVE headers.

Frequency Accuracy

The Web Audio API generates frequencies with sub-Hz accuracy at the system’s native sample rate (typically 44,100 or 48,000 Hz). IEEE 754 double-precision floating-point ensures scientific-grade precision. Smooth transitions use exponentialRampToValueAtTime() for logarithmic sweeps that sound natural to human ears.

Frequently Asked Questions

What frequency range can this generator produce?

The tone generator produces frequencies from 20 Hz (the lowest frequency most humans can hear) to 20,000 Hz (the upper limit of human hearing). You can enter any value in this range with decimal precision (e.g., 440.5 Hz). Frequencies below ~60 Hz may not be audible on small speakers — use headphones or a subwoofer for low-frequency tones.

Is this safe for my hearing?

Always start at a low volume and increase gradually. Prolonged exposure to loud tones — especially at high frequencies — can cause hearing damage. The tool defaults to 75% volume. We recommend using the tool at moderate levels and taking breaks. Never use frequencies above 15,000 Hz at high volume.

What’s the difference between the waveforms?

A sine wave is a pure tone with no harmonics — ideal for calibration and hearing tests. A square wave is bright and buzzy, containing odd harmonics. A triangle wave is softer with fewer harmonics. A sawtooth wave is the richest, containing all harmonics — often used in synthesizers. The oscilloscope and spectrum views visually show these differences.

Can I generate two tones simultaneously?

Yes! Open the Dual-Tone Mode panel and enable Tone 2. You can set a different frequency and waveform for each tone. This is perfect for hearing beat frequencies, testing musical intervals, or creating binaural-like effects (use headphones for stereo separation of binaural beats).

What is a frequency sweep?

A frequency sweep continuously changes the frequency from a start value to an end value over a set duration. It’s commonly used for: speaker/headphone testing (to find resonance or dead spots), hearing range tests (to find your upper frequency limit), and acoustic measurements. The sweep uses an exponential curve that sounds natural to human ears.

Why is 432 Hz included as a preset?

432 Hz is an alternative tuning standard (vs. the standard 440 Hz for A4) that some musicians and researchers believe sounds more natural or consonant. While the scientific evidence is debated, both frequencies are included as presets so you can compare them directly and form your own opinion.

Does this work on mobile phones?

Yes! The tone generator works on iOS Safari 14+ and Android Chrome/Firefox. On iOS, you must tap the “Play” button to start audio (Apple requires a user gesture). Note that phone speakers may not reproduce very low frequencies (below ~200 Hz) — use headphones for best results.

Is any data uploaded or recorded?

No. All tone generation and visualization happens 100% locally in your browser using the Web Audio API. Nothing is sent to any server. The tool works completely offline once loaded.

What is the ADSR envelope and how does it work?

ADSR (Attack, Decay, Sustain, Release) controls how a tone's volume changes over time. Attack is how fast the sound reaches full volume. Decay is how fast it drops to the sustain level. Sustain is the steady volume while held. Release is how fast the sound fades out after stopping. Adjusting these transforms a flat tone into a shaped, musical sound.

What’s the difference between white, pink, and brown noise?

White noise has equal energy at all frequencies (like TV static). Pink noise has more energy in lower frequencies, sounding deeper and more balanced (used for speaker testing and sleep). Brown noise is even deeper with a rumbling quality, popular for focus and relaxation. You can layer any noise type on top of your tone simultaneously.

How accurate is the hearing test?

The hearing test provides a screening-level estimate of your frequency hearing range. It tests 17 frequencies from 125 Hz to 20 kHz. Results depend on your speaker/headphone quality, ambient noise, and volume level. For clinical-grade audiometry, consult a licensed audiologist. Use headphones at a moderate volume for the most reliable results.

Can I download the generated tone as an audio file?

Yes! Open the WAV Export panel, set your desired duration (0.5 to 30 seconds), and click “Download WAV”. The tool renders the tone offline with all your current settings (frequency, waveform, volume, ADSR envelope) and saves a standard 44.1 kHz, 16-bit PCM WAV file. This format is universally compatible with audio editors, DAWs, and media players.

How does the interactive piano keyboard work?

The piano spans 3 octaves (C3–B5, 36 keys). Click or tap any key to play that note using the Web Audio API. The frequency, waveform, and volume are inherited from your current settings above. On desktop, hover over a key to see its note name and Hz value. Piano notes are played independently of the main oscillator, so you can use both separately.

🎙️

Frequency Detector

Detect and analyze frequencies from your microphone in real time with waveform and spectrum display.

Try it →
🧠

Binaural Beats

Generate binaural beats for focus, relaxation, and meditation with customizable frequency differences.

Coming soon →
📊

Spectrum Analyzer

Full-spectrum FFT analysis with logarithmic frequency display and peak detection.

Coming soon →