96 kHz.org
Advanced Audio Synthesis

optimized sawtooth waves for music applications

This page shows some ways to create sawtooth style waves in music synthesizers. The sawtooth wave is one of the fundamental waveforms in electronic sound generation. It contains all integer overtones (harmonics) and therefore sounds very clear and pressureful.  In synthesizers, it serves as the basis for fat basses and lead tracks, as well as for pad sounds for string instruments. Depending on the filtering, it can sound bright, thin, or slightly aggressive.
 

flat sawtooth wave

Unlike the triangle wave, the sawtooth wave contains both even- and odd harmonics. The fundamental has the full initial amplitude. The first overtone, at twice the frequency, has only half the amplitude. The second overtone has three times the frequency and only one-third of the amplitude—with an alternating sign for each of the terms. Musically speaking, the first overtone is the octave, the second is the fifth within that octave, and the next is another octave. The fifth note then jumps to the fifth in the following octave again.

common sawtooth waveform for music apps

Typically the wave is generated with an easy equation using just a counter or the phase vector itself. However the sound can be changed in applying a band limitation:
 

band limited sawtooth wave

The following figure shows the curve when using the first 31 possible harmonics. According to Fourier, this results in limited rises and rest ripple. Even though the curve looks a little strange, it sounds much smoother to our ears.

band limited sawtooth waveform for music apps

Such a band limited waveform is much better for digital systems because together with the limited sampling rate, it does not generate aliasing, which is a major problem in digital synthesizers. If you can limit the number of frequencies, you’ll avoid creating any that might cause problems later on. This also ensures that every note has the same number of overtones. To have a smooth behaviour a soft roll off can be applied:

shark fin wave

If one lets the amplitudes (starting at 100%) fade out toward the harmonics by subtracting a few percent each time, one can reduce the aggressiveness signifiantly. With the 95% configuration, this very smooth curve results as a side effect.

band limited sawtooth waveform with roll off

With this gentle roll-off to the amplitudes a pretty tonal response in the overtones is achieved. The shape reminded my to a shark fin, so I named the preset like this. It works very well when mixed with identical waves that are slightly out of tune to create superimposed waveforms (super saws). However there are still many aggressive harmonics included which cause aggressiveness when it comes to more than 3-4 waves.


musical saw tooth waves

Even with band-limiting to prevent aliasing and roll off of their amplitudes, harmonics still cause a problem when trying to create smooth, full-bodied sounds with chords. In detail the 7th, 11th, and 13th harmonic as well as their octaves do not fit well into the acoustic image. Therefore, another approach is to simply omit them.


band limited musical sawtooth waveform with roll off

Here only the fundamental + 4 octaves and the 3rd + 5th and their octaves are used with a soft roll off. Once again, the curve looks very jagged, but it sounds much smoother already, especially when combined with other elements, more harmonical. Continuing the idea:

band limited musical sawtooth waveform with roll off

Here only 1+3 octaves and the 3rd + 5th and their first octaves are used together with a roll off. Now evidently smoother with less high frequencies and much more harmonical.

And now that the distracting overtones have been reduced, you can also remove the roll-off function.


band limited musical sawtooth waveform with roll off


 This makes the wave slightly sharper again, but it still blends well with other notes in the chord. The rapid beat frequencies are significantly reduced. The sound is clearer and more transparent. The way the sound blends into the decaying waves of other chords through sustain and reverb also becomes more transparent.

It is even possible to overstear the harmonics now using an increasing value instead of an emphasis. The main point here is the limitation of the harmonics at all.

 

band limited musical sawtooth waveform with roll off

Pseudo sawtooth wave with band limitation to musical harmonics.


Conclusion

Bandlimitation avoids the problem of Alias and makes saw tooth waves much more musical. You prevent frequencies from arising that might cause problems later on. If you can limit the frequencies based on the pitch all frequencies in the bass as well in treble range have a similar relative harmonic spectrum. They blend more harmoniously into the music.
Sounds with complex chords by 8 fingers e.g. become softer, especially when using them for string instruments.
 

Read the former article Sawtooth Generation

 

© 2005 - Jürgen Schuhmacher