Claude Shannon[1], information theory guy, worked on machine generated music quite a lot. Some of the ideas transfer. Information theory informs a lot in this area[2].
[1] https://en.wikipedia.org/wiki/Claude_Shannon
[2] http://www.music-cog.ohio-state.edu/Music829D/Notes/Infotheo...