Loading lessons...
Playing Multiple Patterns
Playing Multiple Patterns
You can run several separate patterns at once with stack.
Two patterns side by side
Use stack to play two patterns at the same time:
Why use stack?
The comma inside sound(...) combines into one pattern. stack keeps them as separate patterns, which is easier to read and control - especially for longer pieces.
Add more patterns
Formatting tip
Each pattern gets its own line, ending with a comma - like a list. This is the style used in the [Strudel REPL](https://strudel.cc/) examples.
TL;DR
stack(pattern1, pattern2, ...)plays patterns together.- Great for keeping separate voices readable.
- Common format: one line per pattern, comma-separated.