That's the problem that David Cope had trying to do a Markov-chain-based recreation of Bach, in one of his many experiments in that endeavor; just wanders and doesn't really sound like much, even if all of the n-grams are legit, because it doesn't produce any kind of phrase structure. He ended up with sampling based on hierarchical context instead, iirc:
http://artsites.ucsc.edu/faculty/cope/experiments.htm