Adaptive granular synthesis by means of nth order Markov chain