Tone Generator

Any frequency, any shape, clean enough to measure with.

  • 1 Hz to 22 kHz
  • Sweeps and noise
  • Exports WAV
A grey bench signal generator with knobs and a small glowing screen showing a waveform, beside black headphones on a wooden desk.

The guide

One frequency at a time: what test tones reveal about speakers, rooms and your ears

A sine wave has nothing to hide behind, which is why it exposes aliasing in software, miswired loudspeakers and the upper limit of your own hearing.

  • 20 Hz to 20 kHz range a young person with normal hearing can detect
  • 3.01 dB gap between the peak of a sine wave and its RMS level
  • 3 dB per octave rate at which pink noise falls as frequency rises
  • 1.5 dB how much sooner a band-limited square wave can clip
  • 85 dBA level at which long or repeated exposure can cause hearing loss
Read the full guide Fold the guide 8 min · 20 sources

Most sounds are crowds. A voice, a cymbal, a passing truck: each is hundreds of frequencies arriving together. A sine wave is one frequency, a fundamental with no overtones. That makes it a poor song and an excellent question.

Ask a loudspeaker, a room or an ear that question at 60 Hz, then at 600, then at 6,000, and each answer stands alone. Nothing masks a weak spot. The whole craft of test signals grows from this habit: start with the simplest sound that exists, then complicate it on purpose, one property at a time, so that whatever changes in the result can be blamed on the one thing you changed.

Frequency is counted in hertz, cycles per second, and heard as pitch. Musicians label the same scale with letters. By convention the A above middle C, called A4, is set at 440 Hz. An octave doubles the frequency, and equal temperament cuts each octave into 12 semitones with a ratio of about 1.059, the twelfth root of two. MIDI numbers that A as note 69. Nine semitones below it sits middle C, note 60, at 261.63 Hz.

Four shapes from one ingredient

The classic waveforms of synthesizers and test benches look nothing like a sine, yet each is a stack of sines at whole-number multiples of one frequency. In the Web Audio specification a square wave contains only odd harmonics, each with an amplitude of 4 divided by pi times the harmonic number, so the third harmonic is a third the size of the first and the fifth is a fifth. A sawtooth keeps every harmonic, odd and even, falling in the same one-over-n way. A triangle returns to odd harmonics alone but lets them fall as one over n squared, which leaves its third harmonic at a ninth of the fundamental.

That arithmetic is the whole difference between them. The triangle stays close to a sine because its overtones fade fast. The square and the sawtooth barely let go of theirs: any waveform with a sudden jump in it has a spectrum that falls no faster than 6 dB per octave.

Why a digital square wave lies

Here the trouble starts, because a square wave’s list of harmonics never ends and a digital system’s list of permitted frequencies does. The sampling theorem says a signal can be rebuilt exactly from its samples only if it holds nothing at or above half the sampling rate. Anything higher does not vanish when it is sampled. It aliases: the Web Audio specification warns that such frequencies fold back as mirror images below that halfway point, the Nyquist frequency.

The obvious way to make a digital square, switching each sample between high and low, creates exactly those images. Tim Stilson and Julius Smith opened their 1996 review of the remedies with the rule itself: a waveform with a jump in it must be band-limited to less than half the sampling rate before it is sampled.

A worked case shows the damage. Take a 5 kHz square wave at a sampling rate of 48 kHz, where the limit is 24 kHz. Its harmonics belong at 5, 15, 25, 35 and 45 kHz and onward. The first two fit. The 25 kHz harmonic lies 1 kHz above the limit, so it lands 1 kHz below it, at 23 kHz. The 35 kHz harmonic lands at 13 kHz and the 45 kHz harmonic at 3 kHz, lower than the note itself. None of those is a multiple of 5 kHz. They are not part of a square wave at all.

The cure is to build the wave the way the recipe reads. Add the harmonics one by one and stop before half the sampling rate, a method that is band-limited simply because it never generates the harmonics that would fold. Set the tool on this page to a 5 kHz square, export it at 48 kHz, and the file holds two partials, at 5 and 15 kHz, and nothing else.

Honesty has a price. A square wave that stops at a finite harmonic can no longer have flat tops; it ripples and overshoots beside each edge. The manual for the measurement program Room EQ Wizard notes that a band-limited square may clip up to 1.5 dB sooner than the naive kind for that reason.

Full scale and the decibel

Digital audio has a hard ceiling, the largest number a sample can hold, and levels are counted downward from it in dBFS, decibels relative to full scale. A sine wave whose peaks just touch the ceiling is 0 dBFS by the Audio Engineering Society’s definition, yet its RMS value, the figure that tracks power, is 3.01 dB lower, because the average power of a sine is half its peak power. A square wave has no such gap: its average equals its peak. At the same peak reading a square therefore delivers twice the power of a sine. Peak level tells you about clipping. It does not tell you about heat.

Two tones at once raise the stakes again. Play 440 Hz and 444 Hz together and the pair swells and fades four times a second, the beat frequency being simply the difference between the two. At the top of each swell the waves line up and the amplitude doubles. A pair of equal tones therefore clips 3 dB before a single sine of the same RMS level would.

Sweeps and noise

A sweep is a tone that will not sit still. Slide the frequency in a straight line and every hertz gets equal time, which means the top octave takes half the sweep and the bass is over in a moment. Slide it exponentially, in what is usually called a logarithmic sweep, and every octave gets equal time instead. From 20 Hz to 20 kHz is a little under ten octaves, so a ten-second logarithmic sweep spends about one second in each. Halfway through, it is passing 632 Hz, the geometric middle of the range. A linear sweep at the same instant would already be at 10,010 Hz.

Angelo Farina’s 2000 paper on swept-sine measurement explains why engineers prefer the exponential kind. Played through a system and recorded, a sweep can be mathematically folded back into an impulse response, a compact record of how the system treats every frequency. With an exponential sweep the distortion comes out separately: each order of harmonic distortion packs into its own peak at a precise time ahead of the main response. One pass yields both the response and the distortion, with a better signal-to-noise ratio at low frequencies than a linear sweep gives.

Noise is the opposite strategy: every frequency at once. White noise has equal power in every hertz, and the octave from 10 to 20 kHz holds as many hertz as everything below it combined, so most of its power sits in the treble. Pink noise falls by 10 dB per decade, about 3 dB per octave, which puts the same power into every octave; there is as much between 50 and 100 Hz as between 5,000 and 10,000. The Room EQ Wizard manual recommends pink for testing speakers. White, it says, has much more energy at high frequencies and may damage tweeters at high levels.

Pink noise is also a small lesson in approximation. The slope it needs falls between the ones simple filters offer: a single first-order stage rolls off at 6 dB per octave, which is too steep, and no filter at all is too shallow. Practical generators come close instead. Paul Kellet’s filter, a weighted sum of first-order filters, is quoted as accurate to within 0.05 dB above 9.2 Hz at a sampling rate of 44.1 kHz.

Ears, wires and tweeters

The best known use of a tone generator is a dare: how high can you hear? The textbook span of human hearing is 20 Hz to 20 kHz. The OSHA Technical Manual gives that as what a young person with normal hearing can detect, and adds that the highest audible frequency tends to fall as a person ages. The National Institute on Deafness and Other Communication Disorders calls the hearing loss that comes on gradually with age presbycusis. It is most marked at the higher frequencies, and even young adults may lose tones above 15 or 16 kHz.

The range shrinks through life, usually beginning at around the age of eight with the upper limit, and in adults the threshold of hearing rises sharply at about 15 kHz.

A sweep through your own upper limit is entertaining. It is not an audiogram. A clinical test plots thresholds against a calibrated normal. Here the level and the purity of the sound depend on the sound card and the headphones, and nothing has been calibrated. A generator knows the level it wrote into the samples and nothing about how loud that is by the time it reaches you. Small loudspeakers reproduce low frequencies poorly, so silence at 30 Hz is more likely the speaker’s limit than yours.

A tone can also check your wiring. If one loudspeaker of a pair is connected with its two wires swapped, its cone moves in while the other moves out. Identical signals then cancel instead of adding: material common to both channels drops in level and becomes hard to place, and low frequencies suffer most. The fault does no damage. Send the same low tone to both speakers, flip the polarity of one channel, and keep whichever setting gives the fuller, better centered bass. Polarity is not the same thing as a 180 degree phase shift, which delays a wave instead of turning it upside down.

None of this is worth an injury. The National Institute on Deafness and Other Communication Disorders states that sounds at or below 70 dBA are unlikely to cause hearing loss even after long exposure, while long or repeated exposure at or above 85 dBA can. The occupational limit recommended by NIOSH is 85 dBA averaged over an eight-hour day, halved in duration for every 3 dBA above that. The World Health Organization allows 80 dB for 40 hours a week but 90 dB for only four. A test tone has no quiet passages. Start low and raise the level slowly.

Loudspeakers have an exposure limit of their own. A JBL technical note explains that the energy in the treble of music is typically 10 to 20 dB below the bass and midrange. The high-frequency driver of a system is therefore built to handle only about one tenth of the power: a speaker rated for 100 watts may carry a tweeter good for 10.

Music keeps that bargain. A steady 10 kHz tone at full level does not, because all of it goes to the tweeter. A tweeter’s voice coil is small and wound from thin wire. A voice coil heats up as it works, and extreme heating burns the varnish on the coil. A square wave is worse, carrying both more power and more harmonics.

So a test tone is exact only where the numbers live. An exported file can be checked sample by sample. Past that point the signal meets an operating system mixer, a converter, an amplifier, a loudspeaker and a room, and the generator can vouch for none of them. It cannot tell you how loud the sound is, whether your hearing is normal, or which link in the chain is at fault.

What it can do is ask one question at a time. A sine for the pitch, a sweep for the range, noise for the balance, a flipped polarity for the wiring. The answers come from everything else in the room.

Sources

Every source consulted for this guide. Links checked October 7, 2026.

  1. Web Audio API 1.1 World Wide Web Consortium (W3C)
  2. Alias-Free Digital Synthesis of Classic Analog Waveforms OpenAlex catalogue record W1489573402 (Timothy S. Stilson and Julius O. Smith, 1996)
  3. Nyquist-Shannon sampling theorem Wikipedia
  4. Signal Generator Room EQ Wizard (REW) help
  5. Simultaneous measurement of impulse response and distortion with a swept-sine technique Angelo Farina, Audio Engineering Society 108th Convention, preprint 5093, hosted by the author
  6. DSP Generation of Pink Noise Robin Whittle, First Principles
  7. MIDI tuning standard Wikipedia
  8. Equal temperament Wikipedia
  9. Hearing range Wikipedia
  10. Age-Related Hearing Loss (Presbycusis) National Institute on Deafness and Other Communication Disorders (NIDCD)
  11. Beat (acoustics) Wikipedia
  12. OSHA Technical Manual (OTM) - Section III: Chapter 5 Occupational Safety and Health Administration, U.S. Department of Labor, copy held by the Internet Archive
  13. Noise-Induced Hearing Loss (NIHL) National Institute on Deafness and Other Communication Disorders (NIDCD)
  14. Noise-Induced Hearing Loss National Institute for Occupational Safety and Health (NIOSH), CDC
  15. Deafness and hearing loss: Safe listening World Health Organization, copy held by the Internet Archive
  16. Danger: Low Power JBL Professional technical note, copy held by the Internet Archive
  17. Loudspeaker Wikipedia
  18. Tweeter Wikipedia
  19. Presbycusis Wikipedia
  20. Phase Demystified Sound On Sound