stack() layers multiple independent patterns into one simultaneous polyphonic output
stack() takes multiple pattern arguments and plays them all at the same time, merging their events into a single pattern — like tracks in a DAW. Each argument is an independent pattern (drums, bassline, chords, melody) that keeps its own cycle structure while all cycle together. This is the primary polyphony and multi-part-composition mechanism. Effects such as .speed(), .cutoff(), .gain(), and .attack() are chained onto individual patterns inside the stack, while a transform like .slow() applied to the whole stack scales every layer together. Stacking is distinct from concatenating events with a comma inside one mini-notation string: stack() combines separate full patterns, each independently editable. (In TidalCycles/MiniTidal the same idea is written stack [pat1, pat2, …], with overlay as a two-pattern shorthand.)
Examples
stack(
s(“bd sd”), // drums
"
// TidalCycles equivalent: // stack [s “bd bd2”, s “hh2 [sn cp]”, s “arpy”]
Assessment
Rewrite s(“bd cp”) so a hi-hat (hh*8) plays simultaneously with the kick/snare using stack(). Then explain what a .slow(3/2) applied to the whole stack does to each layer, and how stack() differs from putting patterns in one comma-separated string.