Monday, October 18, 2010

PFE011: Music

This post takes us down a slightly different direction. I have always been involved in music (hence the url), and decided to take some time to discuss it a bit.

Specifically, I'm going to talk about intervals. For some this may be old hat, but I didn't fully understand this until recently even after taking lessons for years, so I hope it is at least a little new. I should note that I am going to stick with intervals as developed in western music. There are two main reasons for this. The first is that most music that you hear on the radio, at the symphony, or that you might play, will use theory developed in this style. The second is that the non-western musical scales and intervals have always confused me.

A basic note in music typically has two main properties. The first is amplitude, or loudness. The second is frequency/wavelength/pitch.

For the sake of modeling purposes, we will consider sounds produced by a string, typically a piano string,
although any kind will do (guitar, violin, etc.). Amplitude is pretty straightforward. The farther away from straight the string vibrates the more it pushes the air and the louder it sounds to anyone who's listening.

Frequency/wavelength/pitch is generally more interesting. I should first note that, for a given string, frequency and wavelength are related. The frequency is the number of times the string vibrates back and forth per second. So if a string takes one second to vibrate back and forth, we say it has a frequency of 1 Hz. If it vibrates back and forth 440 times per second, then it has a frequency of 440 Hz and is known as middle A. One wavelength is the distance between two peaks of the wave at a given instant of time. The possible wavelengths for a given string are determined by the length of the string. Typically if you double the frequency, you halve the wavelength. That is, a string oscillating twice as fast will have shorter waves, by a factor of two.

These two things, frequency and wavelength, determine the "pitch" that we hear. A higher frequency gives a higher pitch. Also, using the above paragraph, we can see that a a longer wavelength will give a lower pitch (think about the difference in sound between a violin and a bass: two comparably constructed instruments with very different wavelengths).

The main theory surrounding relative pitches was originally based on "what sounds good". Pythagoras noticed that when two pitches were played where the second was 1/2, 2/3, 3/4, ... as long as the first, it made a pleasant sound. From this you can define a few important intervals. First, we get the octave (C-C), which is given by the ratio 2:1. That is, if two notes are an octave apart, one of them is on a string twice as long as the other. A fifth (C-G) is described by the interval 3:2 and a fourth (C-F) is described by the interval 4:3. From this you can map out all twelve tones (C,C♯,D,D♯,E,F,F♯,G,G♯,A,A♯,B). The only problem is that when you go up by fourths and fifths, they meet in the middle, and are off, by just a little bit. So to make a piano, using this kind of tuning, you have to actually select the "key" that it is going to be tuned to. That is, you can choose one of the twelve pitches to be the starting note, and music centered on that pitch will generally hit the correct intervals, but music centered somewhere else might sound noticeably out of tune.

To correct for this, a number of rather sophisticated tunings have been proposed. Each of them relies on adding a fudge factor to one interval to make everything line up. But they all are still based on a given first note. In order to make a piano play any song equally well starting on any note, the modern form of tuning makes notes equally spaced across one octave (the twelve-tone-equal-tempered tuning or 12ET). This means that every interval is going to sound a little bit wrong except for the octave.

That's music.

No comments:

Post a Comment