Implemented higher order Markov melodies