By · Updated

Tone Generator

Play Any Frequency and Export as WAV

No ratings yet

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the Tone Generator works

This tone generator plays any frequency you type. Press Play and your browser synthesises a tone at exactly the frequency you type — sine, square, sawtooth or triangle — with the waveform drawn live on the scope and the nearest musical note read out beside it. Change the frequency while it plays and the pitch slides rather than restarting. Export the tone as a WAV file when you need it on disk.

Tone generator: how it works

A tone generator is one of the few test instruments that needs no hardware. The browser's Web Audio API has a built-in oscillator that runs on the audio thread at your sound card's sample rate, so the tone is as steady as a bench signal generator for most practical purposes. Pick a frequency between 20 Hz and 20 kHz, choose a waveform, and press play. Change either while it plays and the tone follows without a restart.

Why a pure tone is useful

Music spreads its energy across thousands of frequencies at once. A test tone puts it all in one place, which lets you isolate a single behaviour:

The four waveforms

A sine has energy at one frequency only, so it is the right choice for almost every measurement. The others add harmonics, whole-number multiples of the frequency you set:

Waveform Harmonics Sounds like Use it for
Sine none pure, flute-like measurement, hearing checks, tuning
Triangle odd, fading fast soft, hollow a gentler tone that small speakers can play
Square odd, fading slowly buzzy, like an old game amp tests, audible low notes
Sawtooth all bright, brassy demonstrating timbre, synth patches

On a phone speaker that cannot play a 60 Hz sine at all, a 60 Hz square wave is still audible, because its harmonics at 180, 300 and 420 Hz fall within the speaker's range. Your ear infers the missing fundamental.

Reading the result

Keep the level low

The volume slider starts at 20 % and is squared on the way to the output, which tracks how loudness is perceived more closely than a straight line. A sustained pure tone is more tiring and riskier for hearing than music at the same level, because all its energy sits in one narrow band of the inner ear. Start quiet, raise it slowly, and never put a high-frequency tone on headphones at a level you have not tested on speakers first.

Exporting a WAV

The export renders the same tone offline as a mono 16-bit, 44.1 kHz WAV file, from 0.1 seconds up to five minutes long. A 20 ms fade at each end stops clicks, which also makes the file loop cleanly. Drop it into any audio editor, load it on a phone as a test signal, or put it on a USB stick for a car stereo check. Nothing is uploaded; the rendering happens in this tab.

Tips and pitfalls

FAQ

Why can't I hear a 20 Hz or 19 kHz tone?

Probably your equipment rather than your ears. Laptop speakers and cheap earbuds roll off sharply below about 100 Hz, and adult hearing generally stops well short of 20 kHz — it usually falls by around a kilohertz per decade of age. Try a higher level cautiously and better headphones.

Which waveform should I use for testing?

A sine wave, unless you have a specific reason not to. It contains one frequency and nothing else, so anything you hear beyond that pitch — buzz, rattle, distortion — is being added by the equipment rather than the signal.

Is the frequency accurate?

It is as accurate as your sound card's clock, which in practice means a few parts per million. The oscillator runs at the hardware sample rate, so the tone is far more precise than anything you could measure without lab equipment.

Can I use this to tune an instrument?

Yes, as a reference pitch. Set the frequency to the note you want — 440 Hz for A4 — and tune to the sine. The cents readout also lets you set up a non-standard reference such as 432 Hz or 415 Hz for baroque pitch.

What does the export produce?

A standard 16-bit mono WAV at 44.1 kHz of whatever length you ask for, with brief fades at both ends to avoid clicks. It opens in every audio editor and player, and is rendered entirely on your own machine.

Is a sustained tone safe to listen to?

At a low level and for a short time, yes, but treat it with more caution than music. All the energy sits in one narrow band, which is both more fatiguing and more damaging at the same apparent loudness, so keep the volume slider low and take breaks.

See also: all Audio tools, Images, Video & Screen, PDF, SVG, Simulations & Screensavers, Generative Art, Chart Makers, 3D Model Viewers, Drawing Pads, Mockups & 3D Making, Diagram Makers, 3D Science, Tracker Music.

Related tools