Hi all,
I just rewrote an abstraction for creating markov chains using a matrix storing the probabilties to get every other states in the finite state machine. Probabilities are caclulated on the sum of every float of every row. A row corresponds to a state (actually, its probabilities to obtain every state next). See wikipedia.org for mathematics behind it.
It is available at http://alexandre.quessy.net/?q=node/43 only at the moment.
This kind of system can be used for weighted random between several effects in an installation, or to build melodies of chord changes, for instance. It uses zexy and iemmatrix. Ah, it is GPL, let say.
Alexandre Quessy http://alexandre.quessy.net