ETM Learn · 02 / 08

Build a sound from simple tones

Add sines, discover timbre and learn when a partial really is a harmonic.

01 · Understand

The previous lesson used one sine. Now we add several to build a richer sound. Each sine is a component, or partial. Choose a 110 Hz fundamental: components at 220, 330 and 440 Hz are integer multiples, called harmonics. The fundamental is 1; 220 Hz is harmonic 2, also the first overtone in this series.

The waveform shows the sum changing over time. The spectrum shows which frequencies participate and their amplitudes. Timbre also depends on how a sound starts, decays and changes. Not every sound has components at exact harmonic frequencies.

Terms within reach

Dotted terms offer a definition on hover, keyboard focus or tap. Click to keep it open; Escape or an outside click closes it. All definitions are also available here.

harmonic

A component at a positive integer multiple of the fundamental frequency. The fundamental itself is harmonic 1.

FFT

An algorithm for the discrete Fourier transform: obtains spectral information from a block of samples. Block length and window affect the display.

Nyquist

Half the sample rate. In this synthesis, components are kept below this frequency to avoid frequency folding.

02 · Play & discover

Begin with one partial. Add components gradually, then change waveform while keeping the fundamental fixed.

Predict → change one control → compare → explain the result.

Experiment 01

Compare sawtooth, square and triangle with the same partial count. Predict brightness before listening. More partials do not automatically make a better sound.

Additive Builder

idle
The sines being added
Their sum - and the ideal shape
The recipe - amplitude of each harmonic
Where they land on a keyboard
fundamental (1st harmonic) odd harmonics even harmonics the ideal shape
vol
audio starts on first click
Partials1
Highest harmonic-
Its frequency-
Error vs ideal-
Peak overshoot-

Experiment 02

An ideal flexible string fixed at both ends must have zero displacement at both boundaries. Real stiffness and boundary conditions can shift modal frequencies away from integer multiples.

The harmonic series on one string

8 shown
Every wave a pinned string can hold, drawn on top of each other
A string is pinned at both ends, so a wave can only live on it if it comes back to zero at both pins. One hump fits. Two fit. Three fit. Two and a half does not, which gives integer-spaced modes in this ideal flexible-string model.

Experiment 03

Change interval, partial count and register separately. Roughness is a feature of this model, not a universal musical consonance score.

Two notes, and every partial each of them has

perfect 5th
Gold means two partials landed on the same frequency. Red means they landed close enough to beat.
two sawtooth notes, held together
Roughness-
Partials that agree-
Frequency ratio-

Experiment 04

Compare a loop’s waveform and spectrum. A finite window estimates the spectrum during that window; a broad peak need not be a separate stable sine.

Analysing a real loop - the same maths, backwards

-
Waveform
Its spectrum - every sine that is in there
real ETM Studio stems
Strongest partial-
Spectral centroid-
Harmonic-looking?-

Check your understanding

A partial is at 330 Hz and the fundamental is 110 Hz. Which harmonic?

03 · Go deeper

For a periodic signal, , plus DC if its mean is nonzero. Ideal sawtooth amplitudes decay as 1/n; a symmetric square has odd harmonics decaying as 1/n; a symmetric triangle has odd harmonics decaying as 1/n² with alternating signs in a suitable sine representation. Phase and sign are part of the recipe.

Near discontinuities, a truncated Fourier series exhibits Gibbs ringing. More terms narrow the region but do not eliminate the limiting relative overshoot. Sampled synthesis must keep components below (fs/2) or filter them. An ideal discontinuity cannot be reproduced exactly at a finite sample rate.

Beating and roughness depend on frequency separation, level and spectrum. Musical consonance also involves context and learning. Equal-tempered intervals generally approximate rather than exactly equal simple frequency ratios.

The mathematics in words

Harmonic frequency

fₙ = n · f₀

Multiply fundamental frequency f₀ by harmonic number n. For a 110 Hz fundamental, harmonic 3 is 330 Hz.

Building a wave from components

x(t) = Σ Aₙ cos(2πnf₀t + φₙ)

For each component choose amplitude Aₙ, frequency n times f₀ and phase φₙ. Calculate its value at time t and add the components; Σ means sum. Add a constant component if the mean is nonzero.

Harmonic amplitude decay

Aₙ ∝ 1/n; Aₙ ∝ 1/n²

The symbol ∝ means proportional to. With 1/n decay, a harmonic with three times the index has one-third the amplitude. With 1/n² decay it has one-ninth. Symmetric square and triangle waves use odd harmonics only; appropriate phases or signs are also needed.

Numerical challenge: try before revealing the solution

01 · In an ideal symmetric triangle, harmonic 3 has amplitude 1/9 of the fundamental. What is its relative level?

Hint

Use 20 log₁₀(1/9), because the ratio is amplitude.

Solution & assumptions

20 log₁₀(1/9) = −19.0849 dBc. The corresponding square-wave harmonic is 1/3, or −9.5424 dBc. Equal harmonic numbers need not carry equal energy.

02 · Separate calculation: at fs = 48 kHz and f₀ = 3 kHz, how many positive integer harmonics lie strictly below Nyquist?

Hint

Solve n × 3000 < 24000. The word strictly excludes the boundary.

Solution & assumptions

n < 8, so harmonics 1–7. Harmonic 8 lands at Nyquist, where sampled sine amplitude depends on phase and arbitrary phase cannot be represented. Harmonic 9 at 27 kHz folds to 21 kHz if generated without anti-alias filtering.

Further reading: Julius O. Smith: Mathematics of the DFT