home/ atoms/ strudel-chunk-function

chunk divides a pattern into n parts and transforms a different part each cycle

chunk(n, transform) divides the current pattern into n equal slices and applies the given transformation to slice 0 on cycle 0, slice 1 on cycle 1, etc., cycling through all n slices. The effect is a gradual, rotating spotlight that processes one part of the pattern at a time, useful for creating evolving textures where each section gets momentarily altered then returns to normal. This is distinct from every (which transforms the whole pattern periodically) — chunk targets a rotating fraction.

Examples

sound(“wind*8?“).legato(“1”).chunk(4, hurry(“<2 0.5>”)) — each cycle, a different quarter of the wind pattern gets speed-doubled or halved.

Assessment

Apply chunk(4, fast(2)) to an 8-element pattern. Map out which elements are affected on cycles 0, 1, 2, 3.

“`chunk` is another good way to add interest over time - it divides the patterns into _n_ chunks”
corpus · music-code-strudel-worksheet-lucy-cheesman-peckham-digital · chunk 2