This simulation uses Markov chains to generate melodies. The chain learns transition probabilities between note sequences, then generates new sequences statistically similar to the training data. Higher order = more memory of previous notes.