home/ atoms/ tidal-sometimes-family

Tidal's sometimes applies a function to random individual events; somecycles applies it to entire random cycles

TidalCycles provides a family of higher-order functions that apply a transformation probabilistically. sometimes f p applies f to individual events in p around 50% of the time; somecycles f p applies f to whole cycles, so either every event in a cycle is transformed or none are. Named aliases encode fixed probabilities: always (100%), almostAlways (90%), often (75%), rarely (25%), almostNever (10%), never (0%). The *By variants (sometimesBy 0.93 f p, someCyclesBy) give precise control at any probability. Choose event-level (sometimes) for scattered per-hit variation, and cycle-level (somecycles) for coherent phrase-level variation, since the whole pattern transforms at once. This lets a performer add occasional variation without disrupting the underlying pattern structure.

Examples

d1 $ sometimes (# crush 4) $ n "0 1 2 3" # sound "cpu"   -- crush ~50% of hits
d1 $ somecycles (hurry 2) $ n "0 1 2 3" # sound "cpu"    -- double-speed ~50% of cycles
d1 $ sometimesBy 0.25 (fast 2) $ s "bd sd"              -- speed up ~25% of events

Assessment

Write a pattern that doubles the speed of randomly chosen events about 25% of the time, then rewrite it so entire cycles are doubled instead. Explain the audible difference between event-level and cycle-level randomness.

“somecycles is similar to sometimes, but works on whole”
corpus · tidalcycles-course-1-structured-4-week-course · chunk 14
“`sometimes` is function, that applies another function to a pattern, around 50% of the time, at random.”
corpus · tidalcycles-randomness-reference-probability-perlin-weighted · chunk 1