Difference between revisions of "rev"
From TidalCycles userbase
(Created page with "{{DISPLAYTITLE:rev}} Type: <syntaxhighlight lang="haskell" inline>rev :: Pattern a -> Pattern a</syntaxhighlight> '''rev''' returns a 'reversed' version o...") |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 20: | Line 20: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | [[Category:Functions]] | + | [[Category:Functions]] [[Category:Time Functions]] |
Latest revision as of 22:27, 9 December 2018
Type: rev :: Pattern a -> Pattern a
rev returns a 'reversed' version of the given pattern.
For example rev "1 [~ 2] ~ 3"
is equivalent to rev "3 ~ [2 ~] 1"
.
Note that rev
reverses on a cycle-by-cycle basis. This means that rev (slow 2 "1 2 3 4")
would actually result in (slow 2 "2 1 4 3")
. This is because the slow 2
makes the repeating pattern last two cycles, each of which is reversed independently.
In practice rev
is generally used with conditionals, for example with every:
d1 $ every 3 rev $ n "0 1 [~ 2] 3" # sound "arpy"
or jux:
d1 $ jux rev $ n (iter 4 "0 1 [~ 2] 3") # sound "arpy"