home/ atoms/ strudel-cat-seq-stack-factories

cat plays patterns one per cycle, seq crams them into one cycle, stack plays them together

Strudel’s three core factory functions build compound patterns from a list of sub-patterns. cat (alias slowcat) concatenates the items so each one takes a whole cycle, giving N patterns over N cycles. seq (alias fastcat) crams all the items into a single cycle. stack plays all the items at the same time at the same length. They map to musical operations: cat = alternation across cycles, seq = subdivided rhythm within a cycle, stack = polyphony. Mini-notation has equivalents (space for seq, comma for stack, angle brackets for cat), but the JS factories are required when the constituent patterns carry heterogeneous sound sources or long method chains.

Examples

cat(“c3 e3”, “g3 b3”) // cycle 1: c3 e3 | cycle 2: g3 b3 seq(“c3”, “e3”, “g3”) // all three in one cycle (= “c3 e3 g3”) stack(s(“bd4”), s(“hh8”)) // kick and hats simultaneously

Assessment

Predict the cycle-by-cycle output of cat(seq("c3","e3"), "g3"), then rewrite it as one mini-notation string and explain any difference.

“The given items are con**cat**enated, where each one takes one cycle.”