Wednesday, August 24, 2016

Why F# is not the same as Gb

When a guitar string is plucked, a standing wave is set up, with a node of the wave on either end of the guitar. This is the fundamental note for the string of the guitar. The wavelength is twice the length of the guitar. The frequency is determined by the material of the string and the tension in the string. However, provided neither the tension of the string nor the length of the guitar changes, a given string will always sound at the same frequency when played open.

When a finger is placed lightly on the string halfway between the end points of the guitar and the string is plucked, a standing wave is set up with nodes at either end plus another in the middle. This wave has a wavelength that is the length of the guitar. When you halve the wavelength, all other factors being the same, the frequency is doubled. That is to say, the wavelength and frequency are inversely proportional. I won't go through the trigonometry of this, but basically, the wave is a sine wave, and the mathematical properties that go with a sine wave apply here also. Oh, and the note sounds an octave higher than the fundamental.

When a finger is placed lighty one third of the way between the ends of the guitar, and standing wave is set up also. It has nodes at the end points, and where the finger is placed. It also has one at the symetrically opposite position. Since the only wave that has a node where the finger is placed has a wavelength one-third of the fundamental wavelength, this is the standing wave that is set up in the string, which means that the other side also has a node. Since this wavelength is one-third of the length of the fundamental wave, the frequency is three times the frequency of the fundamental. The note that is produced is one octave and a perfect fifth higher than the fundamental.

This series keeps going. At one-fourth the distance, the note is two octaves higher. At one-fifth the distance, it is two octaves and a third, etc.

This applies not only to strings, but also woodwinds, brass and percussion. It also applies to resonance in any medium. The overtone series, as it is called, is also present with light waves.

So, if we look at this, we notice that the interval between the first and second harmonic in this series is a perfect fifth. Remember, the first harmonic is an octave higher than the fundamental, and the second harmonic is one octave plus a perfect fifth higher. If x is the frequency of the fundamental, then 2x is the frequency of the first harmonic and 3x is the frequency of the second harmonic. This means that the ratio of the frequencies of the first and second harmonics is 3x/2x, or 3/2, or that a note is a perfect fifth higher than another note if the frequency of the second note is 1.5 times the frequency of the first note.

If we then apply the cycle of fifths over and over again, we get the following sequence. Assume that we have a low C with a frequency of x Hz. Then we have:

Note Frequency
Fund. C x
1st 5th G 1.5 * x
2nd 5th D 1.5 * 1.5 * x
3rd 5th A 1.5 ^ 3 * x
4th 5th E 1.5 ^ 4 * x
5th 5th B 1.5 ^ 5 * x
6th 5th F#/Gb 1.5 ^ 6 * x
7th 5th C#/Db 1.5 ^ 7 * x
8th 5th G#/Ab 1.5 ^ 8 * x
9th 5th D#/Eb 1.5 ^ 9 * x
10th 5th A#/Bb 1.5 ^ 10 * x
11th 5th F 1.5 ^ 11 * x
12th 5th C 1.5 ^ 12 * x

This cycle of fifths covers seven octaves. A note is an octave higher than another note when the frequency is doubled, so given x above:

Fund. C x
1st 8va C 2x
2nd 8va C 4x
3rd 8va C 8x = 2 ^ 3 * x
4th 8va C 2 ^ 4 * x
5th 8va C 2 ^ 5 * x
6th 8va C 2 ^ 6 * x
7th 8va C 2 ^ 7 * x

Now, the highest C we have here we have derived by two different methods. Since is is theoretically the same note, they should be the same frequency. But they are not, since 1.5 ^ 12 <> 2 ^ 7.

This is the simplest case; it gets really messy when you are tuning a piano. Using the overtone series, a perfect fourth has a ratio of 4:3, a major third of 5:4, and minor third of 6:5, and a whole step of 8:7. Half-steps don't really fit. All of these do not propogate well when tuning. Tuning one key is fairly straightforward. Tune the fundamental and all of its octaves. Tune the fifth. Tune the fourth. Tune the major and minor third. Then use the existing notes with fourths, fifths and thirds to tune the rest of the notes. You will then have something which sounds great in the fundamental key, but terrible in non-closely related keys.

To solve this problem, the tempered scale was developed. Instead of the overtone series, the tempered scale is based on dividing the octaves into twelve equal pieces pitchwise. Each piece is then defined to be a half-step, and all of the notes are derived that way. This means that all of the intervals are just a hair flat, but the music can be played in any key and be equally out of tune.

Mathematically, we are mapping a linear set of pitches onto the logarithmic scale of frequency. Let's assume you have a pitch of freq. x. The octave is 2x. You need to find a linear mapping of this to the chromatic scale. So basically, we need to find a value y that when x is multiplied 12 times, the resulting value is 2x.

x*(y ^ 12) = 2*x

Divide by x

y ^ 12 = 2

y = 2 ^ (1/12)

So, to go up a half a step from a note with frequency x:
y = 2 ^ 1/12 * x

There are seven half steps in a fifth (C-C#, C#-D, D-D#, D#-E, E-F, F-F#, F#-G), so to get a note that is a fifth higher, we do the following:

Fund C x
1st C# 2 ^ 1/12 * x
2nd D 2 ^ 1/12 * 2 ^ 1/12 * x = 2 ^ 2/12 * x
3rd D# 2 ^ 3/12 * x
4th E 2 ^ 4/12 * x
5th F 2 ^ 5/12 * x
6th F# 2 ^ 6/12 * x
7th G 2 ^ 7/12 * x

So a note a fifth higher is 2 ^ 7/12 * x.

Applying that to the circle of fifths:

1st C x
2nd G 2 ^ 7/12 * x
3rd D 2 ^ 7/12 * 2 ^ 7/12 * x = 2 * 14/12 * x
etc.
12th C 2 ^ 84/12 * x = 2 ^ 7 * x

and we have matched frequencies.

Fun with spreadsheets. Let's say that our fundamental is a C with a frequency of 100 MHz. The seven octaves mentioned above would be:

0 C 100
1 C 200
2 C 400
3 C 800
4 C 1600
5 C 3200
6 C 6400
7 C 12800

Now, let's show both cycle of fifths:

Note Untempered Tempered
C 100.0 100.0
G 150.0 149.8
D 225.0 224.5
A 337.5 336.4
E 506.3 504.0
B 759.4 755.1
F#/Gb 1139.1 1131.4
C#/Db 1708.6 1695.1
G#/Ab 2562.9 2539.8
D#/Eb 3844.3 3805.5
A#/Bb 5766.5 5701.8
F 8649.8 8543.0
C 12974.6 12800.0

The reason the overtone series is so important is that musical instruments are made to resonate at a fundamental frequecy. They also resonate on frequencies close to them in the overtone series. If you open the pedal on a piano, strike a note and dampen it with your finger, a whole lot of strings will resonate, especially the ones that are octaves lower than the note. The ones that are a fifth away will resonate less loudly, a fourth away, less loudly etc. This phenomena is present will all period resonance. As an experiment one night, go out to your car. Find a low frequency AM radio station and set the preset for it. Then tune to twice the frequency and set it. Switch back and forth. As long as there is not another station interfering, the station should come in loud and clear at twice the frequency; in other words, up an octave. The crystal is vibrating with harmonics.

Feel free to distribute this to whomever you like, but leave my name on it.

Syd Polk