⚠ Learning tool: waveforms are drawn by a browser script and may be imperfect
(floating-point rounding, finite-term truncation/Gibbs, rendering quirks). Treat as a visual aid, not an
authoritative reference; cross-check against a textbook or established software (Wolfram, MATLAB, SciPy).
uses all harmonics (odd + even)amplitude decays as 1/nsign alternates ⇒ ramp shape
Reference: Wikipedia — Sawtooth wave.
Standard analytic synthesis form; see Smith, J. O. (2007). Mathematics of the Discrete Fourier Transform,
W3K Publishing.
Same 1/n decay rate as the square wave, so it also exhibits Gibbs overshoot. But it uses every integer harmonic,
not just the odd ones — that is what gives it its asymmetric ramp.
Frequently asked questions
Why is the sawtooth the 'brightest'-sounding basic wave?
It contains every harmonic — 1st, 2nd, 3rd, and so on — not just the odd ones. That full, dense set of overtones is why a sawtooth sounds rich and buzzy, and why it is the favourite starting waveform for analog synthesisers emulating strings and brass.
Where do sawtooth waves appear in real devices?
The horizontal sweep in old CRT televisions and oscilloscopes is a sawtooth — the beam races across, then snaps back. They also drive the timing ramps in many analog circuits and the pitch sweeps in synthesisers. The slow rise and instant drop is the signature shape.
Why do the harmonic amplitudes fall off as 1/n?
Because the sawtooth has a sharp jump once per cycle, just like the square wave. Any signal with a sudden discontinuity has harmonics that decay slowly, as 1/n. That slow decay is why both the sawtooth and square need many terms and both show the Gibbs overshoot at the jump.
What does the alternating sign in the formula do?
The (-1)^(n+1) factor flips the sign of every other harmonic. That careful alternation is what tilts the wave into its ramp shape rather than a square. Toggle the spectrum on and increase N to see how each added harmonic nudges the line closer to a straight ramp.
How is this different from the triangle wave?
Both can use all or many harmonics, but the sawtooth's amplitudes fall as 1/n while the triangle's fall as 1/n² — far faster. That is why the sawtooth sounds bright and edgy and the triangle sounds soft and flute-like. Open both tabs and compare their spectra side by side.