Tutorials

Sine, Square, Sawtooth: Synthesizer Waveforms Explained

The four basic waveforms, the harmonics behind their sound, and how a filter and an envelope turn a raw wave into an instrument.

By Yunus S. Published Updated

A waveform is the shape of one cycle of a sound. A sine wave is a single pure frequency; the other basic waves add harmonics, multiples of that frequency, on top. A triangle has a few weak harmonics, a square has strong odd ones, and a sawtooth has all of them, which is why it sounds the brightest. A synthesizer starts from one of these waves and shapes it with a filter and an envelope.

In Short

The short version:

  • Sine: no harmonics; pure and soft.
  • Triangle: odd harmonics that fade quickly; mellow.
  • Square: odd harmonics that fade slowly; hollow.
  • Sawtooth: every harmonic; bright and buzzy.
  • A filter removes harmonics; an envelope shapes the loudness in time.

Why Waveforms Sound Different: Harmonics

Play the same note on a flute and on a violin: the pitch is the same, the sound is not. The difference is in the harmonics. Almost every musical sound consists of a fundamental, the frequency we hear as the pitch, plus a series of quieter tones at two, three, four and more times that frequency. Which of these harmonics are present, and how strong each is, gives a sound its color.

The mathematician Joseph Fourier showed that any repeating waveform can be built by adding sine waves at these multiples. For the classic synthesizer shapes the recipes are simple, as the lab notes of an MIT electronics course summarize: a square wave contains only the odd harmonics, each at a strength of one over its number; a triangle wave contains the same odd harmonics, but they fall away with the square of the number; a sawtooth contains every harmonic, odd and even.

The Four Basic Waveforms

Sine

The sine wave is a single frequency with no harmonics at all. It sounds pure, round and soft, like a whistle or a tuning fork. On its own it is used for sub-bass, which should add weight without color, and as a building block: every other sound is a sum of sines.

Triangle

The triangle wave looks like a sine with straight edges, and it sounds like a slightly brighter sine. Its odd harmonics are there but weak: the third is at one ninth of the fundamental, the fifth at one twenty-fifth. It suits soft leads, flute-like tones and mellow bass.

Square

The square wave jumps between two levels and spends equal time at each. It contains the same odd harmonics as the triangle, but far stronger: a third, a fifth, a seventh. The missing even harmonics give it a hollow, woody tone, a little like a clarinet, and it is the sound of early video games. If the two halves of the cycle are made unequal, it becomes a pulse wave, and the tone gets thinner and more nasal.

Sawtooth

The sawtooth ramps up and drops back. It contains every harmonic, each at one over its number, which makes it the richest and brightest of the four. That is why it is the usual starting point for strings, brass, pads and leads: with all the harmonics there, a filter has the most to work with.

Waveform Harmonics Sound Typical use
Sine None Pure, soft Sub-bass, simple tones
Triangle Odd, falling quickly (1/n²) Mellow, flute-like Soft leads, mellow bass
Square Odd, falling slowly (1/n) Hollow, woody Retro leads, clarinet-like tones, bass
Sawtooth All (1/n) Bright, buzzy Strings, brass, pads, leads
Close-up of the knobs and patch cables of a modular analog synthesizer
An oscillator produces the raw wave; everything after it shapes that wave.

From Raw Wave to Instrument

A raw sawtooth is a harsh buzz. What turns it into an instrument is what happens next. In subtractive synthesis, the most common method, the wave passes through a low-pass filter that removes the harmonics above a chosen frequency, the cutoff. Lower the cutoff and the sound gets darker and rounder; raise the resonance and the harmonics around the cutoff are emphasized, which gives the filter a vocal, whistling edge.

The second tool is the envelope, usually written ADSR: attack, decay, sustain, release. It sets how the loudness of each note changes in time. A fast attack and a short decay give a plucked sound; a slow attack and a long release give a pad. The same sawtooth can be a bass, a string section or a bell-like pluck, depending on the filter and the envelope.

A third trick is detuning: two oscillators playing the same wave a few cents apart drift in and out of step, and the result is a wider, livelier tone than either gives alone.

Hear It for Yourself

The quickest way to learn the waveforms is to switch between them while you hold a note.

Step 1: Open the Synthesizer

Open the Web Synthesizer and hold down a key. The display above the keyboard shows the shape of the wave.

Step 2: Switch Waveforms

Change from sine to triangle, square and sawtooth, and listen to how the tone brightens as harmonics are added.

Step 3: Sweep the Filter

With the sawtooth selected, move the cutoff from high to low and watch the wave become smoother as the harmonics disappear.

Step 4: Change the Envelope

Set a long attack and release for a pad, then a short decay with no sustain for a pluck.

To see how the pitch of a note relates to its frequency, the Frequency to Note Converter shows both.

Oscilloscope screen showing a sine wave
An oscilloscope draws the shape of a sound: here the smooth curve of a sine wave.

Play With the Waveforms

Switch between sine, triangle, square and sawtooth and watch the wave as you play.

Open the Web Synthesizer

Free, no sign-up, and your files never leave your device.

Frequently Asked Questions

What is the difference between a sine and a square wave?

A sine wave is a single frequency with no harmonics and sounds pure and soft. A square wave adds strong odd harmonics, which makes it sound hollow and much brighter.

Why does a sawtooth wave sound so bright?

Because it contains every harmonic, odd and even, and they fade only slowly towards the top. No other basic waveform has as much energy in the high frequencies.

Which waveform is best for bass?

A sine or a triangle for clean sub-bass, and a square or a filtered sawtooth when the bass should also be heard on small speakers, which cannot reproduce the lowest notes but can reproduce their harmonics.

What is an oscillator?

The part of a synthesizer that produces the raw wave. It repeats one shape at the frequency of the note; the filter and the envelope then shape that raw sound.

What is subtractive synthesis?

The method of starting with a wave rich in harmonics, such as a sawtooth, and removing part of them with a filter. Most classic analog synthesizers work this way.

What is a pulse wave?

A square wave whose two halves are not equal. Changing that balance, the pulse width, changes which harmonics are present, and the tone becomes thinner and more nasal.