User:Skierpage/The Physics of Music

From Wikibooks, open books for an open world
Jump to navigation Jump to search

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[edit | edit source]

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.


% how to disable bar lines?
\new Staff {
\set Staff.midiInstrument = "acoustic grand"
a'2
\set Staff.midiInstrument = "acoustic guitar (nylon)"
a'2
\set Staff.midiInstrument = "violin"
a'2
\set Staff.midiInstrument = "trumpet"
a'2
\set Staff.midiInstrument = "flute"
a'2
\set Staff.midiInstrument = "tubular bells"
a'2
}
\addlyrics {
\override LyricText.self-alignment-X = #LEFT
piano
guitar
violin
trumpet
flute
bell
}

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[edit | edit source]

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.


	\relative c'
	{
		c c g' g
		a a g2
		f4 f e e
		d d c2
	}

Now let's repeat the musical phrase, starting at a different pitch.


    \transpose c f {
	\relative c'
	{
		c c g' g
		a a g2
		f4 f e e
		d d c2
	}
    }

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[edit | edit source]

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


		{
			c'4 c'' c''' c''''
                        c''' c'' c'2
		}

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 or twice as high, so these two intervals result in a doubling of frequency, the octave described above.


	{
		c'2 g'
		c' f'
		c'4 g' g' c''
		c''2 c'
	}
	\addlyrics {
		up "3⁄2"
		up "4⁄3"
		up "3⁄2" then "4⁄3"
		down octave
	}

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.


	\relative c'
		{
			c d e f
			g a b c
		}
		\addlyrics {
			do re mi fa
                        so la ti do
		}
		\addlyrics {
			C D E F
                        G A B C
		}

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[edit | edit source]

In twelve-tone equal temperament, all other tones are related to this pitch according to the formula:

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.