A saw wave is a periodic function that increases linearly from a minimum to a maximum and then drops suddenly back to the minimum. An inverted saw wave is similar, but decreases from a maximum to a minimum and then jumps back to the maximum.
In discrete time, for example, if N is the period of the function, then the function
is a saw wave. It increases to 1 over N samples, then drops to -1, and again starts increasing back to 1. Its period is N samples. The "floor" function returns the closest integer that is smaller than its argument.
is an inverted saw wave.
If, for example, N = 40, then the saw wave will be as follows.
The inverted saw wave is shown below.
The following are two 5 second samples of a saw wave and an inverted saw wave, both with the frequency of middle C.
Click Play to hear a saw wave.
Click Play to hear an inverted saw wave.
Using saw waves
Because of these harmonics – the evenly spaced notches in the graph above – saw waves are used in synthesizers. To simulate the sound of an instrument, saw waves (as well as square waves and other) with the desired harmonics can be combined and the result filtered (e.g., through a low pass filter).