Difference between revisions of "degrade"

From TidalCycles userbase
Jump to: navigation, search
(Created page with "{{DISPLAYTITLE:degrade}} Type: <source inline>degrade :: Pattern a -> Pattern a</source> ```degrade``` randomly removes events from a pattern, 50% of the...")
 
m
Line 22: Line 22:
 
</source>
 
</source>
  
[[Category:Functions]] [[Category:Randomness and chance]]
+
[[Category:Functions]] [[Category:Randomness and chance]] [[Category:Pattern Transformers]]

Revision as of 21:26, 25 November 2018

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"