You’ll have to be more specific. Is it for a monophonic stream of MIDI notes out?
If so…take a look at [prob] or [coll].
You can use [prob] to create weighted probability tables to control choice-making for, say, a melody. The higher the probability that a state (corresponding to a unique note) will trigger itself, the higher the probability of repetition.
Or you can manually weight a [coll] and retrieve its contents with [urn] or [random].