Finding pattern/loops in dataflow

hi.

i am thinking about the most logical way to recognize loops/ repetitive pattern in an incoming signal.
lets say you parse through a MIDI song file for example, and you want to find the inner logic of repetition/variations etc.

could anyone recommend any script/idea to solve this?

thank you,

krisztian

there is nothing implemented yet in that direction, but if you feel like coding something today, every body will be happy to have a markov chain, it’s a good start. but there are other methods of course, just google for pattern recognition algorithm or such things.