Generate a deterministic rhythmic pattern over bars bars of a time
signature. A grid is built at the chosen subdivision; each slot becomes an
onset with a probability derived from its metric weight scaled by density
and sampled from the seeded PRNG. Every bar's downbeat is always an onset, so
a pattern of any length has a reliable pulse independent of the seed. Each
event's duration extends to the next onset, and the last event extends to the
end of the span. density is clamped to [0, 1].
Generate a deterministic rhythmic pattern over
barsbars of a time signature. A grid is built at the chosen subdivision; each slot becomes an onset with a probability derived from its metric weight scaled bydensityand sampled from the seeded PRNG. Every bar's downbeat is always an onset, so a pattern of any length has a reliable pulse independent of the seed. Each event's duration extends to the next onset, and the last event extends to the end of the span.densityis clamped to [0, 1].