TidalCycles degrade and degradeBy randomly remove events from a pattern at a controllable probability
degrade removes events from a pattern randomly, with each event having a 50% chance of being dropped each cycle. degradeBy p generalises this: degradeBy 0.9 removes events 90% of the time, leaving only 10% surviving. unDegradeBy p inverts the semantics: the argument describes the proportion to keep, not remove. These functions introduce controlled stochasticity — a pattern retains its rhythmic shape on average while individual events flicker. Common use: adding hi-hat variations, randomly dropping percussion hits, or making a dense fill feel more human. The probability is independent per event per cycle.
Examples
d1 $ slow 2 $ degrade $ sound "[[[feel:5*8,feel*3] feel:3*8], feel*4]" # accelerate "-6" # speed "2"
d1 $ slow 2 $ degradeBy 0.9 $ sound "[[[feel:5*8,feel*3] feel:3*8], feel*4]" # accelerate "-6" # speed "2"
Assessment
What is the difference between degrade and degradeBy 0.5? Design a hi-hat pattern that uses degrade to create a flickering shuffle, and explain what unDegradeBy 0.1 would do to the same pattern.