Skip to content
Frequency Generator

Sine, Square, Triangle and Sawtooth Waves Explained

Pick a different waveform in a tone generator and the same 220 Hz note changes character completely. A sine is smooth and pure, a triangle a little brighter, a square hollow and buzzy, a sawtooth bright and brassy. The pitch has not moved. What changed is everything else the wave contains.

That “everything else” is harmonics: extra tones at whole-number multiples of the frequency you set. Sine, square, triangle and sawtooth waves are each a specific recipe of harmonics. Once you know the recipes, you can predict how each wave will sound, why some seem so much louder, and which one to pick for a given job.

Try Frequency Generator

Tone generation, sound tests, and musical tuning in one app.

Harmonics in one paragraph

Any repeating wave can be built by adding sine waves together; that is the core idea of Fourier analysis. The lowest sine, at the frequency you set, is the fundamental. The others sit at 2, 3, 4 and more times that frequency, so a 200 Hz waveform can contain energy at 400, 600, 800 Hz and upward. Your ear hears the fundamental as the pitch and the harmonics as the tone color, or timbre.

The four waveforms compared

Waveform Harmonics Strength of harmonic n Sound
Sine None n/a Pure, smooth
Triangle Odd only 1/n² Soft, slightly flute-like
Square Odd only 1/n Hollow, reedy, buzzy
Sawtooth All 1/n Bright, brassy, buzzy

Sine. A single frequency and nothing else, the sound of an ideal tuning fork. It is also the only waveform where any harmonic you hear must have been added by your equipment, which is what makes it the right choice for testing.

Triangle. Odd harmonics only (3rd, 5th, 7th and so on), and they fall away quickly: the 3rd harmonic has 1/9 the amplitude of the fundamental, the 5th 1/25. Almost all of its energy is in the fundamental, so it sounds close to a sine, only slightly brighter.

Square. Also odd harmonics only, but they fall away far more slowly: the 3rd is 1/3 of the fundamental, the 5th 1/5. That strong, odd-only series gives it a hollow, reedy sound often compared to a clarinet in its low register, which also favors odd harmonics. A square wave is a pulse wave that spends equal time high and low; change that balance, known as pulse width, and even harmonics appear, which is how synthesizers get their “pulse width” sounds.

Sawtooth. Every harmonic, odd and even, each at 1/n strength. It is the richest of the four, and the classic starting point for synthesized strings and brass, because filtering away some of those harmonics gets you a long way toward many natural sounds.

Why square and sawtooth waves sound louder

Switch from sine to square at the same volume setting and the tone can jump noticeably in loudness. Two things cause it.

The signal itself. If a generator keeps the peak level the same, a square wave carries more energy than a sine. Its RMS level is about 3 dB higher, because it sits at full level the whole time instead of curving through zero. A triangle or sawtooth at the same peak actually has slightly less energy than a sine, about 1.8 dB less.

Your ears, which usually matter more. Human hearing is most sensitive roughly between 2 and 5 kHz. A 100 Hz sine has nothing there. A 100 Hz sawtooth has harmonics at 2,000, 3,000, 4,000 Hz and beyond, right where your ears pick up sound most easily. So a low sawtooth can sound far louder than a low sine even though, by the numbers, it has less energy.

The practical lesson: turn the volume down before you switch waveforms, then bring it back up.

Which waveform to use for testing

Use a sine for almost every test. Hearing checks, speaker and subwoofer tests, hunting for rattles, setting crossovers. When you play a sine and hear buzz, grit or a higher pitch, that is distortion created by your speaker, amplifier or room, not part of the signal. With a square or sawtooth the harmonics are there on purpose, so you cannot tell what came from the gear.

This matters most at low frequencies. A 30 Hz square wave seems to play on a laptop speaker that cannot produce 30 Hz at all, because you are hearing its harmonics at 90, 150 and 210 Hz. A 30 Hz sine on the same speaker gives you the honest answer, which is close to silence. The guide to testing a subwoofer and bass response builds on exactly this.

Square waves have an electronics use. Engineers feed square waves into amplifiers and filters and look at the output on an oscilloscope. Rounded corners or ringing on the edges show the limits of the circuit’s bandwidth at a glance.

Which waveform to use for sound design

  • Sine for sub-bass, clean beeps, and building sounds additively by layering several sines at chosen ratios.
  • Triangle for soft leads, flute-like tones and gentle bass.
  • Square for hollow leads and the classic “8-bit” sound; the sound chips in several well-known early game consoles were built largely around pulse and triangle waves.
  • Sawtooth for strings, brass, pads and aggressive leads, usually through a filter.

Frequency Generator offers all four waveforms at any frequency from 1 Hz to 22,000 Hz, and its multi-oscillator plays up to 15 tones at once on the free version. Layering sines at 1×, 2× and 3× a fundamental, then adjusting their levels, is a hands-on way to hear timbre being built from harmonics. The online tone generator lets you switch between the four shapes in your browser.

Aliasing: the catch in digital generation

A mathematically perfect square or sawtooth has harmonics that go on forever. Digital audio cannot represent anything above half its sample rate: about 22 kHz at 44.1 kHz, or 24 kHz at 48 kHz. If a generator calculates a perfect square wave naively, the harmonics above that limit do not disappear. They fold back into the audible range at frequencies that are not harmonics at all. That is aliasing.

An example at a 48 kHz sample rate: a 5 kHz square wave has harmonics at 15, 25 and 35 kHz. The 25 kHz harmonic folds down to 23 kHz, out of hearing, but the 35 kHz one folds down to 13 kHz, which you can hear, and it bears no musical relationship to 5 kHz.

Well-made generators reduce this with band-limited methods that include only the harmonics below the limit. If a high square or sawtooth sounds grainy, whistly or faintly out of tune, aliasing is the likely cause. Sine waves avoid the problem because they have no harmonics to fold.

There is also a curious consequence at the top end. Above roughly 7 kHz, even a square wave’s 3rd harmonic lands above 20 kHz, so a correctly generated high square wave sounds just like a sine. For a sawtooth, the same happens above about 10 kHz. For most adults, whose hearing stops well below 20 kHz, the point where all four waveforms sound alike comes lower still.

A word on volume

Whatever waveform you use, start with the volume low. Square and sawtooth waves can be startlingly loud when you switch to them. High frequencies are perceived as quieter than they really are, so it is easy to set a high tone louder than you realize. Sustained low tones at high level can damage small speakers, and loud sweeps through headphones are never worth the risk. That applies equally in Frequency Generator, in the browser tools on this site, and in any synthesizer.

Get occasional updates

New features, tips, and the occasional announcement. No spam.

More from us