home/ atoms/ tidal-struct-boolean-rhythm

TidalCycles struct imposes a boolean rhythmic structure on any pattern, enabling Euclidean and binary rhythm shapes

struct boolPat p uses a boolean pattern of t (true) and f (false) values to gate pattern p: events only play where t appears. The structure of the output comes from boolPat, not from p. Since Euclidean patterns like "t(3,8)" produce boolean patterns, struct combines naturally with them. Boolean patterns can be inverted with inv: struct (every 3 inv "t f t*2 f") $ sound "cp" plays the pattern structure in two orientations, alternating every 3 cycles. Encoding rhythms as boolean patterns enables easy inversion, combination, and conditional transformation. substruct replaces each true event with a compressed copy of the source pattern rather than gating it.

Examples

d1 $ struct "t ~ t*2 ~" $ sound "cp"
d1 $ struct (every 3 inv "t f t*2 f") $ sound "cp"
d1 $ struct (every 3 inv "t(3,8)") $ sound "cp"
-- stack with inverted structure:
d1 $ stack [struct (necklace 16 [3,5,4,2,1]) $ s "sd",
            struct (inv (necklace 16 [3,5,4,2,1])) $ s "bd"]

Assessment

Explain why struct "t f t*2 f" $ s "cp" produces the same rhythm as struct "t t t*2 t" $ s "cp" with different silences. What does inv do to a boolean pattern? Design a two-voice pattern where kick and snare share a boolean structure, with the snare playing the inverse of the kick’s pattern.

“`struct` places a rhythmic 'boolean' structure on the pattern you give it.”
corpus · tidalcycles-conditions-reference-every-whenmod-mask-euclidin · chunk 2