I think there may have been a thread about this at some point but I'm having no luck with the search function (then again, it may have just been an offshoot discussion in an unrelated topic).
At any rate, since just about everything in Cult is procedurally generated to a greater or lesser extent, lately I've been considering the possibility of procedural music generation. I know there have been some attempts at this and that so far the verdict is that it's not really possible, or at least not without an incredible amount of resources and time at your disposal.
I think perhaps the problem is that the approach so far has been all wrong. People trying to make procedurally generated music have been trying to start from scratch; that is, their program is generating EVERYTHING in a 'composition'. My original attempt at a procedural name generator was something like this. I had it generating everything about a language, including the frequency of every letter in the alphabet, acceptable vowel and consonant clusters for each language, and so on... and the result, despite all of the intricacy, was gobbledegook.
However, with a much simpler and more elegant piece of code that determined acceptable letter combinations by reading from a premade set of base names for a language, I was instantly generating pronounceable (and often even authentic-sounding) names. Imagine that...
So, here's what I've been thinking about: would procedural music work if, rather than having the computer create truly 'random' music, it was instead based upon prearranged (read: human-arranged) pieces of music to begin with? Which notes/note combinations could follow others would be determined in the same way that letter selection in a name generator would be. Ditto note length. Of course, generating a song would be infinitely more complicated than generating a name, because there are multiple instruments to create tracks for, and you would have to create some type of algorithm to ensure that the song would sound harmonious (or at least as harmonious as the original base song(s)).
I have a feeling it could be done, though. Acceptable notes played by each instrument in a song at any given moment could be determined in the same way acceptable note patterns for an individual instrument and temporal patterns would be: by using the original song or songs as a basis and cannibalizing them into their simplest patterns.