Skip to content

Pattern: PMarkov

First-order Markov chain generator.

Arguments

`* an ordered sequence of notes (which will be used to infer the

`probabilities of transitioning between notes), or

* a dictionary of the form { 1: [ 2, 2, 3 ], 2 : [ 3 ], 3 : [ 1, 2 ] },

`where values determine the probability of transitioning from A to B

`based on the number of occurrences of B in the list with key A.