TechCompare LogoTechCompare

Square vs triangle wave: odd harmonics done two ways

Square and triangle both have only odd harmonics, but the triangle's harmonics decay much faster, so it sounds softer. Same pitch, same harmonic series, different character because of the decay rate.

Buzz versus mellow, both using only odd harmonics.

Square and triangle waves both contain only odd harmonics, but they sound nothing alike. A square wave's harmonics fall off slowly (1/n), so the upper harmonics stay strong and the tone reads as bright and buzzy. A triangle wave's harmonics fall off faster (1/n-squared), so the upper harmonics fade quickly and the tone reads as soft and mellow. Same pitch, same harmonic series, completely different character because of the rate of harmonic decay.

By TechCompare · Updated

Try this comparison with our tools

Loading tone generator…
Option A
Square wave
Wins 1 of 6 compared specs
Option B
Triangle wave
Wins 0 of 6 compared specs

Side-by-side specs

SpecSquare waveTriangle wave
Fundamental frequency
Same
Same
Harmonic content
Odd harmonics
Odd harmonics
Harmonic decay rate
1/n (slow)
1/n-squared (fast)
RMS at peak 1.0
1.0 (better on this spec)
0.577
Character
Buzzy, bright
Mellow, soft
Best for
Synth leads, chiptune
Pads, soft modulation

How they differ

Both shapes are built from odd harmonics - the fundamental plus the third, fifth, seventh, and so on. The square wave amplitudes follow 1/n (one over the harmonic number), so the third harmonic is at one-third the fundamental amplitude. The triangle wave amplitudes follow 1/n-squared, so the third harmonic is at one-ninth the fundamental amplitude. That faster decay is what makes the triangle wave softer - the upper harmonics that give the square wave its buzz are negligible. A triangle wave is also closer to a sine in perceived loudness at the same peak amplitude (RMS 0.577 versus 0.707 for sine, 1.0 for square), so it sits between the two extremes in both timbre and loudness.

Verdict

The triangle wave is a square wave with most of its upper harmonics suppressed. Use a square wave when you want buzzy character, a triangle wave when you want the same odd-harmonic structure but softer, or a sine when you want no harmonics at all.

Hear square vs triangle at 440 Hz

Which should you pick?

Choose Square wave

Pick a square wave when the buzzy, brass-like character is what you want: synth leads, chiptune patches, harmonic-distortion tests.

Choose Triangle wave

Pick a triangle wave when you want the odd-harmonic flavor without the harshness: synth pads, soft flute-like tones, gentle modulation sources.

Related comparisons

Frequently asked questions

Why do square and triangle waves sound different despite both having only odd harmonics?
Harmonic decay rate. A square wave's harmonics decay slowly at 1/n, so upper harmonics stay strong and the tone sounds bright and buzzy. A triangle wave's harmonics decay faster at 1/n-squared, so upper harmonics fade quickly and the tone sounds soft and mellow. Same pitch, same harmonic series, completely different character because of the decay rate.
Which is louder at the same peak amplitude, square or triangle?
Square. The square wave's RMS at peak 1.0 is 1.0, while the triangle wave's is 0.577. The square carries more energy across its harmonic spectrum, so it sounds louder at the same peak amplitude. The triangle sits between the sine (0.707 RMS) and the square (1.0 RMS) in both timbre and loudness.
When should I use a triangle wave instead of a square?
When you want the odd-harmonic flavor without the harshness. Triangle waves suit synth pads, soft flute-like tones, and gentle modulation sources. Square waves suit synth leads, chiptune patches, and harmonic-distortion tests. Same odd harmonics, different decay rate, different musical role.