A sawtooth can be constructed using additive synthesis. For period p and amplitude a, the following infinite Fourier series converge to a sawtooth and a reverse (inverse) sawtooth wave:
In digital synthesis, these series are only summed over k such that the highest harmonic, Nmax, is less than the Nyquist frequency (half the sampling frequency). This summation can generally be more efficiently calculated with a fast Fourier transform. If the waveform is digitally created directly in the time domain using a non-bandlimited form, such as y=x−floor(x), infinite harmonics are sampled and the resulting tone contains aliasing distortion.
Animation of the additive synthesis of a sawtooth wave with an increasing number of harmonics
An audio demonstration of a sawtooth played at 440 Hz (A4) and 880Hz (A5) and 1,760Hz (A6) is available below. Both bandlimited (non-aliased) and aliased tones are presented.
Applications
Sawtooth waves are known for their use in electronic music, such as the Hoover sound. The sawtooth and square waves are among the most common waveforms used to create sounds with subtractive analog and virtual analog music synthesizers.
Sawtooth waves are used in switched-mode power supplies. In the regulator chip the feedback signal from the output is continuously compared to a high-frequency sawtooth to generate a new duty cycle PWM signal on the output of the comparator.
In the field of computer science, particularly in automation and robotics, allows to calculate sums and differences of angles while avoiding discontinuities at 360° and 0°.
The sawtooth wave is the form of the vertical and horizontal deflection signals used to generate a raster on CRT-based television or monitor screens. Oscilloscopes also use a sawtooth wave for their horizontal deflection, though they typically use electrostatic deflection.
On the wave's "ramp", the magnetic field produced by the deflection yoke drags the electron beam across the face of the CRT, creating a scan line.