Algorithmic composition
I was thinking back to my days of using PD for random glitchy synth things. I was using Markov chains for doing some random scales. I looked around for some other people doing this and lo did I find this guy
http://www.algorithmiccomposer.com/2010/05/algorithmic-composition-tutorial-markov.html
Algorithmic Composer has not posted in a while but I will be looking at his back issues.