Difference between revisions of "degrade"
From TidalCycles userbase
Left adjoint (talk | contribs) |
|||
Line 21: | Line 21: | ||
# speed "2" | # speed "2" | ||
</source> | </source> | ||
+ | |||
+ | = unDegradeBy = | ||
+ | |||
+ | [[Type signature|Type]]: <syntaxhighlight lang="haskell" inline>unDegradeBy :: Double -> Pattern a -> Pattern a</syntaxhighlight> | ||
+ | |||
+ | <source inline>unDegradeBy</source> is <source inline>degradeBy</source> but with the percentage describing how many events to ''keep'' on average not ''remove''. | ||
[[Category:Functions]] [[Category:Randomness and chance]] | [[Category:Functions]] [[Category:Randomness and chance]] |
Latest revision as of 01:24, 25 December 2020
Type: degrade :: Pattern a -> Pattern a
degrade randomly removes events from a pattern, 50% of the time. Example usage:
d1 $ slow 2 $ degrade $ sound "[[[feel:5*8,feel*3] feel:3*8], feel*4]"
# accelerate "-6"
# speed "2"
degradeBy
Type: degradeBy :: Double -> Pattern a -> Pattern a
Similarly to degrade
, degradeBy allows you to control the percentage of events that are removed. For example, to remove events 90% of the time:
d1 $ slow 2 $ degradeBy 0.9 $ sound "[[[feel:5*8,feel*3] feel:3*8], feel*4]"
# accelerate "-6"
# speed "2"
unDegradeBy
Type: unDegradeBy :: Double -> Pattern a -> Pattern a
unDegradeBy
is degradeBy
but with the percentage describing how many events to keep on average not remove.