Difference between revisions of "palindrome"
From TidalCycles userbase
Tag: Undo |
m |
||
Line 23: | Line 23: | ||
</source> | </source> | ||
− | [[Category:Functions]] | + | [[Category:Functions]] [[Category:Pattern Transformers]] |
Revision as of 21:28, 25 November 2018
Type: palindrome :: Pattern a -> Pattern a
The palindrome function applies rev to a pattern every other cycle, so that the pattern alternates between forwards and backwards.
For example this:
d1 $ palindrome $ sound "arpy:0 arpy:1 arpy:2 arpy:3"
... is the same as this:
d1 $ slow 2 $ sound "arpy:0 arpy:1 arpy:2 arpy:3 arpy:3 arpy:2 arpy:1 arpy:0"
... and indeed this:
d1 $ every 2 rev $ sound "arpy:0 arpy:1 arpy:2 arpy:3"