Melomics is a (successful!) research project partially funded by the Spanish Research Programme, and developed at the University of Malaga.
Melomics applies non-conventional evolutionary algorithms to creating original music without human intervention.
The algorithm operates on data structures (functioning as genomes) which indirectly encode the melodies: each genome undergoes an artificial developmental process to generate the corresponding song. As songs evolve, they are rendered in several formats: playable (MP3), editable (MIDI and MusicXML) and readable (score in PDF).
Science fiction fans have been promised something like this from writers for generations. Read about the robot pianist from Herbert Goldstone's beautiful 1953 story Virtuoso, which describes what a humanoid robot can do once the correlation between dots on sheet music and the levers of a piano are properly explained.
More advanced music systems, some of them from the recent past. Take a look at these: