This is a transformation of Bach’s English Suite #3 Gavotte II movement, BWV 808. The original is here. For the transformation, I allow my preprocessor to chose which measure to play using the Markov Chain Drunkard’s Walk algorithm. I have a list of all the measures in order, and let the preprocessor choose which one is next, constrained to either the next or previous in the list. For example, if measure 5 is chosen, then the next measure to be played can be either 4 or 6, forwards or backwards in the list. If I’m at the end or beginning of the list, it wraps around. There are only 19 measures in the movement.

I start the piece by playing the first five measures in order, then start the randomizer. The next ones chosen for this run through were the following:

- Measure 19
- Measure 01
- Measure 02
- Measure 03
- Measure 02
- Measure 01
- Measure 02
- Measure 01
- Measure 19
- Measure 01
- Measure 02
- Measure 01
- Measure 02
- Measure 03
- Measure 02
- Measure 03
- Measure 02
- Measure 03
- Measure 04

Eventually our drunk wanders across the entire piece after about 100 choices. At the end, I play the last five measures straight.

or download here:

Gavotte II Transformed #2