No history yet

Complex Waveforms

From Simple to Complex Sounds

You already know that pitch corresponds to a sound wave's frequency. A pure, single frequency produces a sine wave, the simplest sound possible. But almost no sound in the real world, from a piano note to the human voice, is just a sine wave. They are all complex waveforms, built from many sine waves layered together. The key to understanding and manipulating sound lies in a powerful idea called the Fourier Theorem which states that any complex, periodic wave can be broken down into a sum of simple sine waves.

The sine waves that make up a complex sound are called partials. The lowest-frequency partial, which determines the note we perceive, is the fundamental frequency. All other partials are overtones. When the overtones are integer multiples of the fundamental frequency (2x, 3x, 4x, etc.), they form a harmonic series and are called harmonics. Most pitched musical instruments produce sounds with a clear harmonic series.

Lesson image

Building Blocks of Synthesis

Synthesizers use oscillators to generate basic waveforms, which are defined by their unique harmonic content. By starting with these harmonically rich shapes and filtering them, we can create an enormous variety of sounds.

Sawtooth Wave: This wave sounds bright and buzzy because it contains the fundamental and all harmonics (both even and odd). The amplitude of each harmonic is inversely proportional to its harmonic number, so the 2nd harmonic has half the amplitude of the fundamental, the 3rd has one-third, and so on.

Lesson image

Square Wave: This wave has a more "hollow" or "reedy" sound than a saw wave. That's because it only contains the fundamental plus the odd-numbered harmonics (3rd, 5th, 7th, etc.). Like the saw wave, the amplitude of these harmonics decreases as their frequency increases. A pulse wave is a variation of a square wave where the width of the positive and negative phases are not equal, which alters the harmonic content and timbre.

// Conceptual formula for building a square wave
// by summing odd harmonics.

function squareWave(t, fundamental_frequency) {
  let amplitude = 0;
  let omega = 2 * Math.PI * fundamental_frequency;

  // Sum the first few odd harmonics
  for (let n = 1; n <= 9; n += 2) {
    // n is the harmonic number (1, 3, 5, ...)
    // 1/n is the amplitude
    amplitude += (1 / n) * Math.sin(n * omega * t);
  }

  return amplitude;
}

Triangle Wave: This wave sounds much softer and more like a sine wave. It also contains only odd harmonics, but their amplitudes decrease much more rapidly than those in a square wave. The amplitude of each harmonic is inversely proportional to the square of its harmonic number, making the higher overtones very quiet.

Timbre and Noise

The specific recipe of a fundamental frequency and its overtone structure is what gives a sound its unique character, or timbre. It’s why a violin and a trumpet playing the same note (the same fundamental frequency) sound so different. Their harmonic distributions are not the same. The relative amplitudes of the harmonics are just as important as which ones are present.

The waveforms we've discussed so far—saw, square, triangle—are all periodic. They have a repeating pattern, which is what gives them a discernible pitch. But not all signals are periodic. An aperiodic signal has no repeating pattern and no clear pitch. We perceive this as noise.

White noise, for example, is a signal that contains all audible frequencies at equal amplitude. Pink noise also contains all frequencies, but their amplitude decreases as frequency increases, which sounds more natural to our ears. In a digital audio workstation (DAW), you can analyze any sound to see its frequency content, a process called spectral analysis. This allows you to see the fundamental and harmonic peaks that define an instrument's timbre, or the flat spectrum of noise.

Lesson image

Understanding this relationship between a wave's shape in time and its harmonic content in the frequency domain is fundamental to synthesis, mixing, and all forms of sound design.

Quiz Questions 1/6

According to the Fourier Theorem, any complex, periodic wave can be broken down into what?

Quiz Questions 2/6

Why do a violin and a trumpet playing the same note (e.g., A4 at 440 Hz) sound distinctly different?