home/ atoms/ tidal-shuffle-scramble

Tidal's shuffle plays a random permutation of a pattern's parts (without replacement); scramble picks parts with replacement

Both shuffle n p and scramble n p divide pattern p into n equal parts and reorder them anew each cycle. The difference is sampling without vs. with replacement. shuffle returns a random permutation: each part appears exactly once per cycle, so the set of events is preserved and only their order changes. scramble selects the parts at random with replacement: any part may appear multiple times or not at all, so it can repeat and omit events. Consequently shuffle gives subtle, predictable reordering that keeps every hit, while scramble gives more chaotic variation that can drop or repeat material. For n parts over many cycles, each part still appears once per cycle under shuffle but averages once per cycle (with high variance) under scramble.

Examples

d1 $ sound $ shuffle 3 "bd sn hh"   -- e.g. "sn bd hh", never "bd sn bd"
d1 $ sound $ scramble 3 "bd sn hh"  -- can produce "bd sn bd" or "hh hh hh"

Assessment

A pattern has parts A B C. After shuffle 3, which outputs are possible? After scramble 3, which additional outputs become possible? Over 8 cycles, how many times does each part appear on average under each function, and when would you prefer shuffle over scramble?

“`shuffle` takes a number and a pattern as input, divides the pattern into the given number of parts, and returns a new pattern as a random permutation of the parts, picking one of each per cycle.”
corpus · tidalcycles-alteration-reference-ply-chunk-linger-snowball-s · chunk 2
“with shuffle, -- every cycle, you'll hear each part exactly once”
corpus · tidalcycles-course-1-structured-4-week-course · chunk 12