Monday, April 09, 2007

The eigen-Key to the Piano

I am not a musician. In fact, my knowledge of music is very limited and anything I might have picked from listening to Bach (which was triggered from reading G.E.B.) is probably ruined from listening to Progressive Rock. I am a physicist, and that grants me the arrogance to attack any problem with the math tools I love so much. Sometimes this method is successful, sometimes it is not. But I'm stubborn and I use it a lot.

I have always looked at the piano (as a tangible projection of music theory) and wondered how come you got black and white keys in the following manner.



I was expecting a repeating pattern, but why does it repeat at the 8th white keys? Why are the black keys grouped in that form? After studying this, and punching a few numbers on my handy calculator, I think I have come up with an explanation that makes sense to me. If you are a sonographer, a soundtitian or a musicneer (I'm looking at you, readers that went to El Conservatorio), and can illuminate/correct/expand my interpretation, please do so.

Let's turn to Pitagoras, wave mechanics, and the vibrating string. Imagine a string hanging by its ends, like a very tight clothes lines. If plucked, it will vibrate at certain frequencies. The standing vibrations follow harmonics, that is, waves with wavelengths that are integer multiples of the length of the clothes line.




The red one only has one hump, this is called the fundamental (first) harmonic. The green one has two humps, and it is exactly 1/2 the length of the first harmonic. This is what makes it a second harmonic. The blue one has three humps, making it the third harmonic, each hump of 1/3 the length. No political affiliations should be interpreted from the colors of these graphs. More harmonics can exists, but these ones were the most dominant ones for Pitagoras' purposes. There are others of interest, such as the fourth (or twice and 2), and the ninth (or thrice as the third one). What is important to note is that since all these harmonics can coexist in a string and create new sounds that sound great with each other.

Now, since Pitagoras identified the 1/2 length and the 1/3 length of the wavelength as important, when will their multiples match? That is, if I took 1/2 of 1/2, and then 1/2 of that, and then again, all these would be also harmonics. If I took 1/3 of 1/3 and so on, they would also be valid harmonics. Will the wavelengths of the multiples of the second and third harmonic ever match? In other words:



which integer values of m and n will make this equality true? Well, there is a solution that its very close to it:



See? Keep this numbers, 5 and 8, in the back of your head, we will see them again.

Now, in the keyboard above, the red spot corresponds to a fundamental frequency, the green spot to its second harmonic, and the blue one to its third harmonic. The first and second harmonic are exactly 8 keys apart and when played together they sound so well that I can't really differentiate that there are two sounds. The second and third are 5 keys apart, and when played together they also sound really well. The magic numbers 5 and 8 appeared! That is, the subdivisions of white keys were chosen to represent the multiples of these harmonics. In other words, if you started on the piano and pressed every 8th key you will be moving along the multiples of 2 of the second harmonic. If starting on the same point as before you pressed every 5th key, you would be moving on the multiples of 3 of the second harmonic. At one point, (5*8=40 keys later), there will be a key where both harmonics match.

Yes, but what about the black keys? Well, let's do a similar exercise but starting with every key inside the octave, for a total of 8*8=64. If we were going to find the key that matches for each of these second harmonics with a third harmonic, or which k would make 5*k=8*8=64?. We solve this and obtain



or 13 different tones! If we count the number of keys, both white and black, from the red spot (the fundamental harmonic) to the green spot (the second harmonic), we will see that, yes, there are 13 of them! The keyboard of the piano does make sense!

If you are modulus-inclined, things will make a lot more sense if you work out the above in terms of modulus arithmetic.


Now now, you might have caught me cheating. I'm approximating a bunch of stuff, nothing is exact. Will this matter? The answer is yes, it does matter. This is a problem when tuning instruments, and historically it has been resolved in many different ways, adding the little errors here or there to try to keep things consistent. For most practical purposes, we won't notice this as there is a very small difference to start with.

But, I can envision a situation where we could detect this, where the errors would add up in a way that we could hear. Imagine a pipe organ, a huge one, that has a sufficiently long register, or enough keys and pedals. If we played a particular key at a somewhat low octave, and the same key in a much much much higher octave, we should be able to tell that they aren't perfectly tuned. In fact, we would hear beats. But beats are a subject for another time.

6 comments:

Anonymous said...

!!!!!!

Phobos said...

I know!

Anonymous said...

Like, I'd just like to say.. like well... how does it feels you know like, to have you brain in a totally.. like diferent, you know... wave length from everyone else's? I lost you like from "eigen" on but I kept on reading, just to find out if there's one thing there I could understand. I didn't, there isn't.

Anonymous said...

DAH!! I KNEW THAT!!!!

Phobos said...

Disclaimer: I am weird.

Anonymous said...

Tu ves!! Por esto es que yo tengo un amigo fisico!!! Excelente...