Harmonics are whole multiples of a frequency. For instance, the harmonics of
110 Hz are 220, 330, 440, 550 Hz, etc.
The relationship with musical instruments explained on Wikipedia:
Harmonic.
Below more synthetic waves:
A sawtooth wave can be 'build' adding sinusoidal waves. The amplitude of
the harmonics is inverse proportional to their frequency;
sin(x) + 1/2 sin(2x) + 1/3 sin(3x) + 1/4 sin(4x) etc.
Where 'x' varies in time to generate a sinusoidal wave.
The image below shows the first nine harmonics being added one by one.
As you can see the wave looks a bit 'wrinkled'. Adding more harmonics will
make the wave look nicer, but the wrinkly bits never go away completely.
The image below shows a sawtooth with 50 harmonics;
A Video (with sound) of a 440 Hz sawtooth wave with
the first 10 harmonics being added one by one.
Real live sawtooth waves look nicer than this. They have more harmonics
and the highest harmonics are a bit weaker than in the 'recipe' above.
This makes them kind of smooth.
Here all the harmonics are present all the way up to halve the sample
frequency. The signal is passed through a 24 dB/Oct low-pass filter.
The cut-off frequency is increased to multiples of the first harmonic in
nine steps.
A Video of the cut-off frequency being
increased in 10 steps; From 440 Hz to 4400 Hz.
This is actually a bit more like something you may encounter 'in the wild'.
A square wave is like a sawtooth, but only contains odd harmonics;
sin(x) + 1/3 sin(3x) + 1/5 sin(5x) + 1/7 sin(7x) etc.
The image below shows the harmonics three to nine being added one by one.
The image below shows a square wave with 49 harmonics;
A Video of a 440 Hz square wave with
harmonics three to nine being added one by one.
Here all the harmonics are present all the way up to halve the sample
frequency. The signal is passed through a 24 dB/Oct low-pass filter.
The cut-off frequency is increased to multiples of the first harmonic in
nine steps.
A Video of the cut-off frequency being
increased in 10 steps; From 440 Hz to 4400 Hz.
The frequencies of some harmonics are pretty close to the frequencies of other notes. The table below shows how much;
Harm | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | % |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | C₁ | C♯₁ | D₁ | D♯₁ | E₁ | F₁ | F♯₁ | G₁ | G♯₁ | A₁ | A♯₁ | B₁ | C₂ | 0 |
2 | C₂ | C♯₂ | D₂ | D♯₂ | E₂ | F₂ | F♯₂ | G₂ | G♯₂ | A₂ | A♯₂ | B₂ | C₃ | 0 |
3 | G₂ | G♯₂ | A₂ | A♯₂ | B₂ | C₃ | C♯₃ | D₃ | D♯₃ | E₃ | F₃ | F♯₃ | G₃ | -0.11 |
4 | C₃ | C♯₃ | D₃ | D♯₃ | E₃ | F₃ | F♯₃ | G₃ | G♯₃ | A₃ | A♯₃ | B₃ | C₄ | 0 |
5 | E₃ | F₃ | F♯₃ | G₃ | G♯₃ | A₃ | A♯₃ | B₃ | C₄ | C♯₄ | D₄ | D♯₄ | E₄ | 0.79 |
6 | G₃ | G♯₃ | A₃ | A♯₃ | B₃ | C₄ | C♯₄ | D₄ | D♯₄ | E₄ | F₄ | F♯₄ | G₄ | -0.11 |
7 | A♯₃ | B₃ | C₄ | C♯₄ | D₄ | D♯₄ | E₄ | F₄ | F♯₄ | G₄ | G♯₄ | A₄ | A♯₄ | 1.78 |
8 | C₄ | C♯₄ | D₄ | D♯₄ | E₄ | F₄ | F♯₄ | G₄ | G♯₄ | A₄ | A♯₄ | B₄ | C₅ | 0 |
9 | D₄ | D♯₄ | E₄ | F₄ | F♯₄ | G₄ | G♯₄ | A₄ | A♯₄ | B₄ | C₅ | C♯₅ | D₅ | -0.23 |
10 | E₄ | F₄ | F♯₄ | G₄ | G♯₄ | A₄ | A♯₄ | B₄ | C₅ | C♯₅ | D₅ | D♯₅ | E₅ | 0.79 |
11 | F♯₄ | G₄ | G♯₄ | A₄ | A♯₄ | B₄ | C₅ | C♯₅ | D₅ | D♯₅ | E₅ | F₅ | F♯₅ | 2.75 |
12 | G₄ | G♯₄ | A₄ | A♯₄ | B₄ | C₅ | C♯₅ | D₅ | D♯₅ | E₅ | F₅ | F♯₅ | G₅ | -0.11 |
13 | G♯₄ | A₄ | A♯₄ | B₄ | C₅ | C♯₅ | D₅ | D♯₅ | E₅ | F₅ | F♯₅ | G₅ | G♯₅ | -2.37 |
14 | A♯₄ | B₄ | C₅ | C♯₅ | D₅ | D♯₅ | E₅ | F₅ | F♯₅ | G₅ | G♯₅ | A₅ | A♯₅ | 1.78 |
15 | B₄ | C₅ | C♯₅ | D₅ | D♯₅ | E₅ | F₅ | F♯₅ | G₅ | G♯₅ | A₅ | A♯₅ | B₅ | 0.67 |
16 | C₅ | C♯₅ | D₅ | D♯₅ | E₅ | F₅ | F♯₅ | G₅ | G♯₅ | A₅ | A♯₅ | B₅ | C₆ | 0 |
17 | C♯₅ | D₅ | D♯₅ | E₅ | F₅ | F♯₅ | G₅ | G♯₅ | A₅ | A♯₅ | B₅ | C₆ | C♯₆ | -0.29 |
The percentage in the last column shows how close the frequency is;
frequency tone - frequency harmonic Percentage = ───────────────────────────────────── * 100 % frequency tone
The above table can also be used to work out approximate frequency ratios.
E.G.:
C : G ≈ 2 : 3 C : E ≈ 4 : 5 E : G ≈ 5 : 6
Etc.