@ingox @porres Hi, just stumbled across your Markov remarks. A long time ago I wrote a markov external for pure data (c code, no abstraction) which can handle markov chains of any order (realtime adjustable) and has the option for internal/external feedback changing probabilities and such which is still functional. As it uses binary search trees it is extremely fast and has (somewhat limited) support for lists of integers as elements (like dtime, keynum, velocity or chords).
It is quite flexible as it also allows to define deviations in the values to still being considered as being equal and more.
It's open source and I can dust it off and send it in case you're interested. I'm never on this forum and just registered for letting you know. Don't know if I receive/see any answer from you.