Pitch
How high or low a tone sounds, set by its frequency, and why the twelve-tone octave repeats all the way up and down the keyboard.
Pitch
Pitch is how high or low a tone sounds. Physically it is governed by frequency — the number of times per second the air pressure cycles — measured in hertz (Hz). A slow vibration (few cycles per second) sounds low; a fast one sounds high. The single most important fact about pitch is that our ears hear it logarithmically: doubling the frequency does not sound "twice as high," it sounds like the same note, one octave up.
The octave and the twelve tones
When one frequency is exactly double another — say 220 Hz and 440 Hz — the two tones blend so completely that we give them the same letter name. That doubling is the octave, and it is the closest thing music has to a law of nature.
Western music slices each octave into twelve equal steps, the semitones. Climb twelve semitones and you have multiplied the frequency by two; you are back where you started, an octave higher. Because every step multiplies the frequency by the same factor, that factor must be the twelfth root of two, 2^{1/12} \approx 1.0595. This scheme is called equal temperament, and it lets the same note land in tune in every key.
Taking the note A above middle C as a reference of 440 Hz, any note n semitones away has frequency
so n = +12 gives 880 Hz (an octave up) and n = -12 gives 220 Hz (an octave down). Notice this is closely related to the way a vibrating string's overtones stack up in whole-number multiples — but pitch as we name it is the logarithmic ladder above, not that overtone series.
Play an octave
The keyboard below is one octave: seven white keys (C D E F G A B) and five black keys (the sharps and flats) wedged between them. Click a key to select it — the panel shows its name, its distance n in semitones from A, and the frequency from Equation 1.
Every key you press is some n in Equation 1; the black keys simply fill in the half-steps between the white ones. Twelve presses to the right and the pattern — and the frequency ratio of 2 — repeats exactly.