Here are five melodies my computer program wrote today, all in one MP3 file:
Examples of computer generated melodies
A few things to note:
1. The program is still working within limitations of only being able to compose in C major, only being able to use the basic triads, only being able to compose 8-bar melodies in 4/4 time. I will, of course, work to remove those limitations, but there is still more work to do on the algorithm first.
2. As you can hear, some of the melodies don’t sound that great. I think they technically work (they don’t sound like random atonal garbage), but they’re not quite memorable. I really like the first one though, and the second and third one have some interesting parts. Anyway, my goal with the program isn’t to get it to output something beautiful every single time; the point is to give the user melodic ideas. As the algorithm is now working pretty fast, the user should be able to have the program generate 100 or so melodies at a time, then he can browse through the results and find whatever strikes his fancy.
3. The five melodies in that MP3 are based on melodic knowledge the program learned from just two melodies. So if they sound kinda similar now and then, that’s why. But still, it amazes me how much musical variety can emerge from such a small set of knowledge. I look forward to building the program’s knowledge database; I can’t wait to see what sort of stuff it might produce with knowledge from several hundred melodies or so.