I've been wanting to try something like this for a while, now.
I started by recording myself playing around on my keyboard (psr 710) to a metronome using several different organ and piano voices. Then I took those recordings into a wave editor and cut them into bunches of short riff fragments and saved them as individual files. Then I loaded those files into buzz as wave table sounds to be used with "Probability drummer", a Buzz synth that allows you to to give each note in a pattern a certain chance of playing or not. This was pretty much all done on Jeskola Buzz, a Piece of public domain freeware. Once you get your head wrapped around entering your parameters in hex, It's pretty amazing.