sometimes/often/every apply transformations probabilistically or periodically in Strudel
Strudel provides a family of higher-order functions that apply a transformation only some of the time: sometimes (~50% of events), often (~75%), rarely (~25%), and every(n, transform) (once every n cycles). These are key performance tools: they add variation without requiring the performer to manually change patterns. every is deterministic (period-based); sometimes/often/rarely are stochastic (event-level). Combining them allows cascading uncertainty while keeping the overall structure audible.
Examples
.every(2, fast(2)) — doubles speed every other cycle. .sometimesBy(.5, ply(2)) — each event has 50% chance of being doubled.
Assessment
Chain every(4, fast(2)) and sometimes(rev) on a pattern. Describe what happens at the 4-cycle boundary versus what happens randomly within cycles.