User:Skierpage/The Physics of Music

Sound waves travel through a medium (usually air), cause our eardrums to vibrate, and we perceive this as sound. Like electromagnetic waves, sound waves have a frequency and wavelength, related by the speed of sound (about 343 meters per second), which we perceive as pitch. They also have an amplitude, which we perceive as volume.

Noise, sound, and pitch
However, most sounds we hear are a jumble of different sound waves.

Musical notes differ from noise in that they have an audible and somewhat constant lowest frequency. This can be produced by the vibration of a string, such as striking the strings in a piano, plucking a guitar string, or by air passing over your vocal chords when you sing; or it can be produced by striking a vibrating surface such as a bar in a xylophone or a tuned drum; or by a vibrating column of air in an organ or wind instrument. Here are various instruments all playing the same frequency note, 440 cycles per second. They sound different, but most people can perceive that they are the same "note"; if you sing along with them you would sing the same pitch. The difference in the quality of the sound of each is called timbre

In the 20th century mankind was able to directly synthesize audio waveforms. Here is a pure sine wave at 440 cycles per second (hertz or Hz), followed by a sawtooth waveform, and a square wave. Here is a view of 0.01 seconds of the three waveforms, so about 4 cycles of each wave.

The sine wave has no overtones, the other shapes do. Wolfram|Alpha can display the overtones of these different wave shapes: sinewave, sawtooth, square wave

Musicians realized that by shortening the length of the string (and increasing its tension, and using different materials), plucking the string produces different pitches. A shorter string or column of air produces a higher frequency, and the note sounds higher.

Relative and absolute pitch
Conventional music consists of notes of different pitches and durations, also of different volumes.

Here is a simple musical phrase. The notes go up and down in pitch. Over centuries, Western musicians have established a notation for the different pitches and durations of these notes. Don't worry about the details of musical notes, just notice them moving up and down on the set of lines as the music progresses left-to-right; higher-pitched notes appear higher. Now let's repeat the musical phrase, starting at a different pitch. It sounds different, but most people will recognize it as the same tune, because the relative changes in the pitches are the same.

When you hear an orchestra tuning up, the musicians are adjusting their instruments to produce the same pitch for a particular note, otherwise the ensemble will sound out of tune. In Western music, the primary reference tone is the pitch A above middle C. Most musicians and orchestras tune their instruments so this note's fundamental frequency is 440 Hz. This is the pitch of the tone played by different instruments in the audio samples earlier).

Relationship between frequencies
Western music theory originated with the findings of the ancient Greek philosopher Pythagoras based on the vibrations of a string.

The fundamental frequency is the frequency where the entire string vibrates backwards and forwards with two nodes at the ends where the string is tied down. To try this, hold a spring between yourself and a partner and rocking it back and forth steadily until the entire spring sways without being disrupted. This is the fundamental frequency.

Many string instruments such as a violin and some wind instruments such as a trombone can produce a continuous range of frequencies. So why do we choose certain relative pitches for music? The relative change in pitch between two notes is called an interval, and some intervals sound better than others. If you halve the length of the string, that halves the wavelength of the sound it produces, doubling its frequency. This pleasing jump is called an octave. The note is higher, but it sounds the same. You can shorten the string by half again, or double the length of the string If you press on the string 1/3 from one end and pluck the remainder, the remainder is 2/3 as long, so the note is 3/2 higher. Similarly, if you press on the string 1/4 from one end and pluck the remainder, the string is 3/4 as long, the note is 4/3 higher. In a happy mathematical result that blew Pythagoras's mind, if you combine these two intervals, the pitch rises 3/2 higher, and then rises 4/3 higher, the result is $${\frac{3}{2} \times \frac{4}{3}} $$ or twice as high, so these two intervals result in a doubling of frequency, the octave described above. Space precludes the origin of all the other intervals, but Western music evolved to use a set of seven intervals from the starting note to the final eighth note at twice the frequency of the first. You may be familiar with this as the major scale and do-re-mi scale.

If we start at a frequency around 440 Hz and call that pitch 'A', then we can name the subsequent notes B C D E F G, and then we are an octave higher at 'A'.

Returning to the fractional intervals, the fourth note where the frequency is 4/3 higher is called a perfect fourth, the fifth note where the frequency is 3/2 higher is called a perfect fifth, and the final eighth note where the frequency is twice as high as the starting note is called an octave from the Latin for "eighth." (note these numbered positions are not fractions – a fifth is the fifth note in the scale, not the fraction one fifth higher.)

Equal temperament
In twelve-tone equal temperament, all other tones are related to this pitch according to the formula: $$F(n) = 440 \times 2^{\frac{n}{12}} $$

The first overtone (also known as the second harmonic) occurs when the length of a string is halved (while its tension is unchanged). The frequency of the second harmonic is twice that of the first. The frequency of the third harmonic is three times that of the fundamental and so on.

It is not important to understand all of the physics of this, but it is important to remember that modern music is based of the harmonic series. The further something is from the fundamental on the harmonic series, the less consonant it is said to be. While typically consonant notes are the unison, octave, fifth, sixth, and third and dissonant notes the second, seventh, and tritone, as well as all augmented or diminished intervals, consonance is now considered a relative matter based on the harmonic series and context.