Skip to content
Tutorials Center
My learning

Topics

Lesson 7 of 50 ยท Sound, Notes and Rhythm

Pitch, frequency and timbre

How pitch relates to frequency, why octaves double, how equal temperament tunes twelve notes, what the harmonic series is and why instruments have different timbres.

Pluck a guitar string and it vibrates back and forth hundreds of times a second. Shorten the string by pressing it against a fret and it vibrates faster, and the note rises. That is the basic law of pitch: faster vibration, higher note. Everything else in this lesson grows from it. You will see why the A above middle C is 440 Hz, why an octave doubles the frequency, how the twelve notes of the keyboard are spaced and why a trumpet and a flute sound so different even when they play the same note.

Understanding this does not make you a better listener overnight, but it does make music less mysterious. Intervals that sound pleasant turn out to be simple frequency ratios, the keyboard turns out to be a clever compromise, and the "color" of a sound turns out to be a recipe of overtones that you can mix yourself.

A grand staff with the first eight harmonics above C2 and their frequencies in hertz
The harmonic series: a note's overtones are whole-number multiples of its frequency, and they outline a major triad.

What you will learn

  • What frequency and hertz mean and how they map to pitch
  • Why an octave is a 2:1 ratio and how equal temperament spaces the twelve notes
  • What cents are and how to compare tunings
  • What the harmonic series is and how it explains timbre
  • How a waveform's shape and its overtone mix are connected

Key terms

Frequency: cycles of vibration per second, in hertz (Hz).

Equal temperament: the tuning in which every half step is the same frequency ratio, 2^(1/12).

Cent: one hundredth of an equal-tempered half step; an octave is 1,200 cents.

Harmonic series (overtone series): the set of frequencies that are whole-number multiples of a fundamental.

Fundamental: the lowest and usually strongest frequency of a note; it sets the pitch you hear.

Frequency and the pitch standard

A vibration that repeats 440 times per second has a frequency of 440 hertz, written 440 Hz. Named after the physicist Heinrich Hertz, the unit simply means cycles per second. The note that has this frequency is A4, the A above middle C, and orchestras tune to it. The standard of A = 440 Hz was recommended by an international conference in 1939 and later adopted by the International Organization for Standardization (ISO 16 in 1955). It is only a convention: many early-music groups tune A to about 415 Hz for baroque repertoire, and some orchestras use 442 or 443 Hz for a brighter sound. Before standards existed, pitch varied between cities and even between churches.

Doubling a frequency raises the pitch by one octave. A3 is 220 Hz, A4 is 440 Hz and A5 is 880 Hz. The human ear treats any two notes related by a 2:1 ratio as very similar, which is why they share a letter name. Pitch perception is therefore logarithmic: we hear equal multiplication as equal steps. The step from 220 to 440 Hz sounds the same size as the step from 440 to 880, even though the second spans 440 Hz and the first only 220.

Equal temperament: twelve equal steps

Between A4 and A5 the keyboard offers twelve half steps. If each half step multiplies the frequency by the same ratio, then twelve multiplications must equal 2, so the ratio is the twelfth root of 2:

ratio = 2^(1/12) โ‰ˆ 1.059463

This is twelve-tone equal temperament (12-TET). The frequency of any note is then

f = 440 ร— 2^((n โˆ’ 69) / 12)

where n is the MIDI note number (60 for middle C, 69 for A4). For middle C, n = 60 and the formula gives 440 ร— 2^(โˆ’9/12) โ‰ˆ 261.63 Hz. Try a few values in the Python example below.

Why compromise like this? A pure tuning, just intonation, uses simple whole-number ratios: a perfect fifth is 3:2, a perfect fourth 4:3, a major third 5:4. These intervals ring beautifully when played alone. But a keyboard tuned in just intonation for one key is badly out of tune in other keys. Equal temperament gives up a tiny amount of purity in every interval so that every key sounds equally acceptable. It was refined by theorists in the sixteenth and seventeenth centuries and became the standard for the piano in the nineteenth. The equal-tempered fifth is only about 2 cents narrower than the pure one, hard to hear, but the major third is about 14 cents wider, which is noticeable on a sustained chord.

A cent is 1/100 of an equal-tempered half step, so an octave is 1,200 cents. Ratios convert to cents with cents = 1200 ร— log2(ratio). A 3:2 fifth is 701.955 cents, versus exactly 700 in equal temperament; a 5:4 major third is 386.31 cents versus 400.

The harmonic series and overtones

A plucked string does not vibrate only as a whole. It also vibrates in halves, thirds, quarters and so on, all at once. Each of these modes produces its own frequency: 2 times, 3 times, 4 times the fundamental and so on. These are the harmonics (or partials). The fundamental is the first harmonic and the ones above it are overtones. Your ear hears the combination as a single note with the pitch of the fundamental and a tone color that depends on how strong each harmonic is.

The picture at the top of the lesson writes the first eight harmonics above C2 (65.41 Hz) on a staff:

  1. C2 at 65.41 Hz (the fundamental)
  2. C3, an octave above, at 130.81 Hz
  3. G3, a fifth above that, at 196.22 Hz
  4. C4, two octaves above the fundamental, at 261.63 Hz
  5. E4 at 327.03 Hz
  6. G4 at 392.44 Hz
  7. a note a little flatter than Bโ™ญ4 at 457.84 Hz
  8. C5 at 523.25 Hz

Look at the pattern: octaves, then fifths, then major thirds. The first six harmonics outline a major triad, the most stable chord in Western harmony, which is one reason theorists have long seen the major triad as "natural". The seventh harmonic falls about 31 cents below the equal-tempered Bโ™ญ, so it does not match any piano key; this is why blue notes and barbershop sevenths sound slightly different from the keyboard.

The intervals between harmonics shrink as you climb: the gap from harmonic 1 to 2 is an octave, from 2 to 3 a fifth, from 3 to 4 a fourth, from 4 to 5 a major third. Each time the ratio is n+1 : n.

Timbre: why the same note sounds different

Play the note A4 on a flute, a violin and a clarinet. All three produce a fundamental at 440 Hz and a family of overtones at 880, 1,320, 1,760 Hz and so on. What differs is how strong each overtone is. A flute is nearly a pure tone, with weak overtones. A clarinet has strong odd harmonics (1, 3, 5, ...) and weak even ones, which gives it a hollow, woody quality; its shape is nearly a square wave. A violin or a trumpet has many strong harmonics, giving a bright, buzzy tone.

The mathematician Joseph Fourier showed in the early nineteenth century that any repeating wave can be written as a sum of sine waves with frequencies that are whole-number multiples of a fundamental. This idea, called Fourier analysis, is the base of digital audio and every synthesizer. In the illustration below, four classic synthesizer waveforms are shown with the strength of their first eight harmonics. A sine wave contains only the fundamental. A square wave contains odd harmonics with strength 1/n. A sawtooth contains all harmonics with strength 1/n. A triangle wave contains odd harmonics falling off as 1/nยฒ.

Four waveforms with bar charts of their harmonics
The four classic waveforms differ only in the recipe of harmonics.

Timbre also depends on time: how a note begins (the attack), how it holds and how it fades. A piano note starts instantly and decays, an organ note holds steadily, and a bowed violin can swell. If you removed the first 50 milliseconds of a piano note, it would be hard to recognize. The overall shape of loudness over time is the envelope.

Common misconceptions

"Each pitch contains only one frequency." Natural notes contain many frequencies at once. Only an electronic sine wave is a single pure frequency.

"Equal temperament is out of tune, so just intonation is correct." Neither is "right". Just intonation is purer for one key; equal temperament is a practical compromise that makes all keys usable. Singers and string players often adjust their intonation toward just ratios in context.

"The fundamental is always the loudest harmonic." Often it is, but not always. Some instruments have a weak fundamental, and your brain still hears the pitch from the pattern of overtones (the "missing fundamental" effect).

Try it

Build a sound from harmonics. Each slider sets the strength of one harmonic of A3 (220 Hz). The picture shows the sum, and you can play it. Press a preset and watch the wave change shape: a square wave has only odd harmonics, a sawtooth has all of them with strength 1/n.

Additive synthesizer: mix your own timbre

Now compare tunings numerically. This program converts the simple whole-number ratios of just intonation into cents and compares them with the equal-tempered interval. Which intervals match closely, and which do not?

Python Just intonation versus equal temperament

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Finally, listen to the difference. Both buttons play the major third above C4 together with C4: one tuned in equal temperament and one in just intonation. The difference is about 14 cents, small but audible as a gentle "beating" in the equal-tempered chord.

Hear a just major third against an equal-tempered one

Check your understanding

Quick check ยท 6 questions

of 6 answered You scored / 6 ยท perfect!

  1. 1. If A4 is 440 Hz, what is the frequency of A5?

    An octave doubles the frequency, so A5 is 880 Hz and A3 is 220 Hz.
  2. 2. In equal temperament, each half step multiplies the frequency by:

    Twelve equal multiplications must give a factor of 2, so each is 2^(1/12).
  3. 3. Which harmonic of C2 is the note G3?

    Harmonic 1 is C2, 2 is C3, 3 is G3, 4 is C4. The third harmonic is a fifth above the second.
  4. 4. Which waveform contains only the fundamental?

    A pure sine wave is a single frequency. The others are sums of harmonics.
  5. 5. What mainly makes a clarinet sound different from a flute on the same note?

    Timbre comes from the relative strengths of the harmonics and from the envelope, not from the fundamental pitch.
  6. 6. How many cents are in one octave?

    A half step is 100 cents and an octave is twelve half steps.

Summary

  • Pitch depends on frequency in hertz; A4 is 440 Hz by convention.
  • An octave doubles the frequency; the ear hears pitch logarithmically.
  • Equal temperament multiplies each half step by 2^(1/12) and trades a little purity for freedom in all keys; a cent is 1/100 of a half step.
  • A note contains the fundamental and overtones at whole-number multiples; the first harmonics outline a major triad.
  • Timbre comes from the mix of harmonics and from the attack and decay, which the Fourier idea explains.

Next: Note values, dots and ties