home/ atoms/ tidal-euclidean-syntax

TidalCycles parenthesis notation (k,n) generates Euclidean rhythms directly in mini-notation

In Tidal’s mini-notation, appending (k,n) to a sample name distributes k onsets evenly across n steps using the Bjorklund/Euclidean algorithm: bd(3,8) places 3 kick hits across 8 steps (the Cuban tresillo). An optional third argument rotates the pattern: bd(3,8,2) shifts by 2 steps. The equivalent function form is euclid 5 8 $ sound "bd". When applied to complex patterns with euclid, the structure is lost and k sounds are selected from the pattern. Euclidean parameters can themselves be patterned: bd([5 3]/2,8) alternates between 5 and 3 onsets. This gives one-parameter access to a library of traditional world rhythms.

Examples

d1 $ sound "bd(3,8) sn*2"        // tresillo over snare
d1 $ sound "bd(5,8)"             // cinquillo
d1 $ sound "bd([5 3]/2,8)"       // alternating Euclidean
d1 $ euclid 3 8 $ sound "bd*2 [sn cp]"  // euclid function form

Assessment

Without a computer, place the 5 onsets of E(5,8) on a grid of 8 steps. Then write the Tidal pattern for a Ruchenitza rhythm E(3,7) layered with a cinquillo E(5,8) hats.

“If you give two numbers in parenthesis after an element in a pattern, then Tidal will distribute the first number of sounds equally across the second number of steps”
corpus · tidalcycles-userbase-tutorial-community-function-by-function · chunk 5