Test Tones and the Waveforms Behind Them
After reading this you will know what a sine, square, sawtooth or triangle tone actually contains, how to pick a frequency and level for a given test, and how to read the result without damaging your ears or your gear.
What a test tone is
A test tone is a signal with a known shape, frequency and level. Because you know exactly what went in, you can measure what comes out. If you play a 1000 Hz sine wave and the speaker sounds gritty, the grit is not in the signal, so it is in the amplifier, the driver or the room.
Here is one hook. Play a slow sweep from 20 Hz up to 20000 Hz at a fixed level and listen. You will hear the tone fade in the deep bass, feel it get loud and harsh around 2000 to 4000 Hz, then fade again near the top. Nothing changed in the signal. What changed is your ear. Human hearing is far more sensitive in the 2 to 5 kHz region, by roughly 30 to 40 decibels compared to 50 Hz. A single tone generator makes that fact audible in ten seconds.
When to use one, and when not
Reach for a test tone when you need a reference you can trust. Common jobs:
- Check whether the left and right channels play, and play the right way round, by sending a tone to one channel at a time.
- Find a rattle or buzz by sweeping until an object in the room resonates.
- Set a rough level match between two devices using a steady
1000 Hzsine. - Test the low end of a subwoofer with tones at
30,40and60 Hz.
A tone generator is the wrong tool when timing matters more than pitch. To keep a steady beat for practice or recording, use the Metronome instead. And a pure tone tells you nothing about how a system handles complex material like speech or music, so do not judge overall sound quality from a single frequency.
A pure tone puts all of its energy at one frequency, so it feels louder and more fatiguing than music at the same meter reading. Start low, especially on headphones. A level that is comfortable for a song can be painful as a steady sine.
The four waveforms and their math
The generator builds each sample from a phase that advances every step. For a tone at frequency f and time t in seconds, the phase in cycles is f \cdot t. The sine wave is the simplest:
Here A is the amplitude (peak height, from 0 to 1 at full volume), f is the frequency in hertz, and t is time. One full cycle takes 1/f seconds. At 440 Hz that is about 0.00227 seconds per cycle.
A sine holds all its energy at exactly f. The other three shapes are built from a sine at f (the fundamental) plus sines at whole-number multiples (harmonics). This is the key idea from Fourier analysis: any repeating waveform is a sum of sines.
- Square
- Odd harmonics only (3f, 5f, 7f, \dots), each at amplitude 1/n. Sounds hollow and buzzy.
- Sawtooth
- All harmonics (2f, 3f, 4f, \dots), each at 1/n. Bright and rich, the harshest of the four.
- Triangle
- Odd harmonics at 1/n^2, so they fall off fast. Sounds soft, close to a sine.
The square wave, written as its harmonic sum, is:
The term 2k+1 generates the odd multiples 1, 3, 5, 7 and so on. The 1/(2k+1) factor means the third harmonic is one third as loud as the fundamental, the fifth is one fifth, and so on. That slow rolloff is why a square wave sounds so bright: it still has strong energy far above the fundamental.
Worked example: reproducing the demo
A 440 Hz sine at the default level
The demo uses the field defaults: a sine wave at 440 Hz (concert A), a moderate volume, and both channels. Work through what that produces.
- Period: 1/f = 1/440 \approx 0.002273 seconds, or about
2.27 msper cycle. - Samples per cycle at a
44100 Hzsample rate: 44100 / 440 \approx 100.2 samples. Plenty of points to trace a smooth curve. - Amplitude at, say,
50%volume: A = 0.5, so the wave swings between-0.5and+0.5of full scale. - Peak value in the file: 0.5 \times 32767 \approx 16384 for 16-bit signed samples.
Because a sine has no harmonics, its highest frequency component is 440 Hz itself. That is far below the 22050 Hz ceiling (half the sample rate), so nothing is lost and nothing folds back.
Watch the waveforms change
The instructive thing a static picture cannot show is how adding harmonics reshapes a wave. Start from a single sine and stack odd harmonics at 1/n amplitude, and the smooth curve grows flatter tops and steeper edges until it looks like a square.
Reading and interpreting what you hear
Two numbers explain most of what you notice. The first is frequency and pitch. Doubling the frequency raises the pitch by one octave. So 220, 440 and 880 Hz are three A notes an octave apart. The second is level and loudness, which are not the same. Loudness depends on frequency, as the sweep hook showed.
When you switch waveforms at the same frequency, the pitch stays put but the tone changes character. That difference is the harmonic content in the table below. Notice how much energy the sawtooth still carries at the fifth harmonic compared to the triangle.
| Harmonic | Frequency | Sine | Square | Sawtooth | Triangle |
|---|---|---|---|---|---|
| 1st | 100 Hz | 1 | 1 | 1 | 1 |
| 2nd | 200 Hz | 0 | 0 | 0.5 | 0 |
| 3rd | 300 Hz | 0 | 0.333 | 0.333 | 0.111 |
| 5th | 500 Hz | 0 | 0.2 | 0.2 | 0.04 |
| 7th | 700 Hz | 0 | 0.143 | 0.143 | 0.0204 |
Common mistakes
Most trouble comes from a few habits.
- Starting too loud. A meter reading that felt fine for music can be dangerous as a sustained tone. Bring the volume up from silence.
- Trusting a very high square or saw. Set a square wave to
15000 Hzand its third harmonic would sit at45000 Hz, well above the22050 Hzthat a44100 Hzfile can hold. Those harmonics fold back down to audible frequencies as aliasing, so the tone no longer sounds like a clean square. Stick to sines for tests above a few kilohertz. - Confusing amplitude with loudness. A
60 Hztone and a3000 Hztone at the same amplitude are not equally loud. The high one can be20to30 dBlouder to your ear. - Assuming both channels are fine. Test left and right separately. A reversed or dead channel is easy to miss with a stereo tone.
To check for a rattle, sweep slowly through the bass rather than jumping between fixed notes. Resonances are narrow: an object might buzz hard at 73 Hz and be silent at 70 and 76 Hz.
Related tools
For steady timing rather than steady pitch, the Metronome gives you a click track with accents and tap tempo. If you want to generate spoken audio instead of tones, the Text to Speech Playground reads text aloud with your system voices. Both run in the browser like this generator, so nothing you make is uploaded.
Frequently asked questions
What frequency should I use to test speakers?
Use 1000 Hz for a general reference, since it sits near the middle of hearing and most gear is specified there. For bass, try 30, 40 and 60 Hz. For a tweeter, try 10000 Hz. Always use a sine for these checks.
Why does a square wave sound louder than a sine at the same setting?
A square wave carries extra energy in its harmonics. Its root-mean-square level is higher than a sine of the same peak amplitude, by about 3 dB, and the added high harmonics fall in a sensitive part of your hearing. Both effects make it sound louder.
Can I hear a 20 Hz tone?
Barely, and only if it is loud and your speakers can reproduce it. Most small speakers and earbuds roll off well before 40 Hz, so you may feel or hear nothing. That is a limit of the hardware, not the signal.
Why does a high square or sawtooth sound wrong?
Aliasing. When a harmonic exceeds half the sample rate (22050 Hz at 44100 Hz), it folds back into the audible range at the wrong frequency. The higher the fundamental, the worse it gets. Use a sine above a few kilohertz.
What sample rate does the WAV export use?
Exports use a standard CD-quality rate of 44100 Hz with 16-bit samples, which faithfully represents any tone up to 20000 Hz. The Nyquist ceiling is half the sample rate, so 22050 Hz, leaving headroom above the audible range.