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:
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