Tidal's weave function offsets multiple patterns in time while applying a shared effect pattern, creating canonic and spatial structures as side effects
The weave function in TidalCycles takes a cycle count, an effect pattern, and a list of sound patterns. It applies the effect pattern (stretched over the given number of cycles) to each sound pattern, but offsets each sound pattern in time. Designed for spatialization (with a pan pattern, each sound pattern sweeps through the stereo field out of phase), it also generates canons when the roles of sound and effect are swapped: a sound pattern applied across different effect patterns in different phases produces a rising scale or other melodic structure that continuously ascends. This shows how a single algorithmic abstraction generates multiple musical affordances beyond its original design intent.
Examples
weave 16 (pan sine) [s "bd sn cp", s "casio casio:1", s "jvbass*2"]
``` Creates three patterns sweeping through stereo space in different phases. Swapping sound and effect creates a canon.
## Assessment
Describe what the weave function does in TidalCycles and explain how the same function can produce both spatialization effects and canonic melodic structures, depending on how it is used.