Thursday, February 15, 2007

An aside about keyboards

Multiplication in equal steps can be found on the modern piano keyboard.

On the piano, the sound frequency, or pitch, of each key can be found by multiplying the frequency of the previous key by 21/12. After 12 notes, or 12 multiplication steps, we increase the sound frequency by a factor of 2, which is an octave.

If we hold down one key and then press keys to the right of it, we'll hear the following intervals (an interval is the ratio of two frequencies).

21/12= 1.05946309... (the first few digits given for this and other numbers)
22/12= 1.12246205...
23/12= 1.18920712...
24/12= 1.25992105...
25/12= 1.33483985...
26/12= 1.41421356...
27/12= 1.49830708...
28/12= 1.58740105...
29/12= 1.68179283...
210/12= 1.78179744...
211/12= 1.88774863...
212/12= 2

The fact that each two subsequent notes have the same ratio of frequencies is referred to as "equal temperament". It means that you can take any melody and start playing it some number of keys to the left or to the right, and it will sound the same, just transposed.

Note that all the ratios listed above are complicated-looking numbers. Before equal temperament, the ancients preferred simpler frequency ratios such as 3/2 or 4/3 -- ratios you can easily get on a violin by holding down the string in the right place. Problem is, you can only tune the keyboard once, then you have to play it. Suppose your octave consists of 4 notes:

1
4/3
3/2
2

Now, holding down the middle two notes produces the interval (3/2) / (4/3), or 9/8. So since you're getting this interval anyway, you should add a key to your octave tuned at 9/8 with respect to the first key:

1
9/8
4/3
3/2
2

But now, the keys 4/3 and 9/8 give you the interval 32/27 (4/3 divided by 9/8), so you better add that one as well. But if you do, a new interval 256/243 will pop up right away, and so on. With pure ratios, you can never add the right number of keys so that you don't get out-of-tune-sounding intervals somewhere in the middle. It's OK to have an out-of-tune-sounding interval in the middle, because you can compose your melody around it. But the moment you try to shift your melody right or left, you'll hit that interval and it will sound wrong.

Interestingly, when Bach wrote his famous Well-tempered clavier, the keyboard he used didn't sound like the one we have now, because the keys were tuned differently. The well-tempered tuning system was sort of a compromise between the ratio-based and the modern equal-tempered tuning.

The actual digits in the numbers above are not interesting. Given the first few digits of a number such as 1.41421356..., we actually know less than if given the real thing: 21/2. But somehow we feel better when given the actual digits of the number. It's true, we do know the answer is somewhere around 1.4, but the other digits are just not worth remembering. If we had eight fingers on each hand, the digits would have been different anyway.

No comments:

Archive