Music is Math
Gintautas Miliauskas blogs about a computer program that can generate something which reportedly really sounds like composer-written music; apparently it has passed a 'turing test' where people listened to music generated by this thing, and music written by a human composer.
I'm afraid, however, I'll have to disappoint him a bit, really. If we ignore the effect that music can have on the emotional state of a living being for a moment, then it's a plain and simple fact that music is pure math:
- 'An octave' is the musician's term for 'a doubling in frequency'. As many people know, a center A on a piano is tuned at 440Hz; it follows that an A one octave higher is tuned at 880Hz, and that the one which is one octave lower will be 220Hz.
- 'Chords' are based around that, too. A regular C chord, for example, contains the C, E, and G notes; and usually, a C at one octave above the first C is included, too. The frequency of a G is exactly halfway between the two C notes, and the E is about halfway between those. Most chords are built in such a manner; the sound waves of those notes will build an interference pattern that is perceived as a chord.
- A melody usually starts with the base note of the key in which the piece is written, and almost always (except during a short time in the early baroque) ends with that same base note. Note that the 'base' note is not the same thing as the "bass" note (although the base is often used in the bass).
There are many other things in music that can be expressed as mathematical rules; learning to how to compose music involves learning those rules, which is a long and tedious process.
Now I'm not saying that following those rules will necessarily lead you to an interesting piece of music; the fact that it's possible to create something ugly while still using chords etc. But since so much of it already is math, I can imagine it not being extremely hard to figure out what the other rules are (the ones a composer figures out by imself as opposed to being taught them), transferring them into a computer program, and using that to generate music.
That's not to say that such a thing is easy to do, and I'm sure it's still an impressive feat to create a computer program which can create "nice" sounding music; but I don't think this would qualify as 'artificial intelligence'. At least not any more than Deep Blue
"The frequency of a G is exactly halfway between the two C notes"
Actually, each half-step is \sqrt[12]{2} up in frequency (that's the 12th root of 2 in LaTeX format). So after you multiply a C by the twelfth root of 2 twelve times (that is, you go 12 half-steps up) you end up doubling the frequency.
SOOO. The frequency of a G is only halfway between the two C notes in some strange logarithmic space.
I was running through it, and it's not even "halfway".
There are 7 half-steps between C and G
C C# D D# E F F# G 1 2 3 4 5 6 7
and only 5 half-steps between G and the high C:
G G# A A# B C 1 2 3 4 5
IIRC it has more to do with the 3rd harmonic (second overtone) of one being "close" to the 2nd harmonic (first overtone) of the other. Or something like that. Overtone is a music word, harmonic is a ham radio word, they suffer from a zeros-ones-origin mismatch...
73 de KE3HE
(Moderator: please feel free to combine and/or paraphrase these two replies)
You say that, "[t]he frequency of a G is exactly halfway between the two C notes," but this is not the case for all tunings (or more precisely, temperaments).
The interval of a fifth (C:G) is "naturally" tuned to be a 3:2 ratio (1.500). However, in modern western music using an even temperament, the ratio is actually the seventh power of the twelfth root of two (1.498). Have a look over http://en.wikipedia.org/wiki/Musical_temperament -- the topic can become quickly complicated and very controversial when doing period performances of e.g. Baroque music.
I do agree that there is a very close relationship between mathematics and music. This is especially true once you get into detailed musical analysis, or start looking at the serialist composers, or the works of Schoenberg and his students.
Enjoy,
Marek
I forgot to mention: my piano tuner doesn't tune my piano in exact doublings of frequencies from the bass notes to the topmost notes. He slightly compensates for psychoacoustic effects where a perfect doubling of frequency would "sound" a little flat/sharp at the extremities.
Marek