Difference between revisions of "rev"

From TidalCycles userbase
Jump to: navigation, search
m (Yaxu moved page Rev to rev)
 
(No difference)

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"