TidalCycles rot rotates the values of a pattern leftward while preserving the original rhythmic structure
rot n p shifts the values in pattern p by n positions to the left, leaving the rhythmic structure (timing, rests, note lengths) unchanged. Only the pitch/sample/value assignments shift. rot 1 on "a b c d" produces "b c d a". This is the modular-rotation concept applied to pattern values. The first parameter may be a pattern itself: rot "<0 0 1 3>" $ n "0 ~ 1 2 0 2 ~ 3*2" leaves the pattern static for two cycles, then rotates by 1, then by 3. Value rotation creates melodic variations without rewriting a pattern; it is also used to generate complementary voices from a shared rhythmic skeleton.
Examples
d1 $ rot "<0 0 1 3>" $ n "0 ~ 1 2 0 2 ~ 3*2" # sound "drum"
-- cycle 1-2: normal; cycle 3: rotated by 1; cycle 4: rotated by 3
Assessment
Explain what rot 2 $ s "bd sn hh cp" produces and how its rhythmic structure compares to the original. How could you use rot to create a melodic canon (second voice following the first)?