home/ atoms/ tidal-ribbon-timeline-slice-loop

TidalCycles ribbon cuts a fixed window from a pattern's timeline and loops that window

ribbon offset cycles p treats the entire span of pattern p as a ribbon of time, cuts out a piece cycles long starting at offset cycles in, and loops that piece. ribbon 1 2 $ s "<bd sd hh ht>" starts at cycle 1 and loops the two cycles from there, so it plays <sd hh> repeatedly — the bd (cycle 0) and ht (cycle 3) never sound. Unlike loopFirst (which always takes cycle 0) or timeLoop (which wraps from the start), ribbon lets you loop any arbitrary window deeper into an evolving pattern. Its alias is rib. This is the tool for isolating and repeating a specific slice of a long, non-repeating structure.

Examples

d1 $ ribbon 1 2 $ s "<bd sd hh ht>"   -- loops <sd hh>
d1 $ rib 4 1 $ n "<0 1 2 3 4 5 6 7>" # sound "arpy"  -- loops just index 4

Assessment

Given s "<a b c d e>", what does ribbon 2 2 loop? How does ribbon differ from loopFirst and timeLoop in which window of the timeline it captures?

“Loops a pattern inside an `offset` for `cycles` . If you think of the entire span of time in `cycles` as a ribbon, you can cut a single piece and loop it.”
corpus · tidalcycles-alteration-reference-ply-chunk-linger-snowball-s · chunk 2