Difference between revisions of "layer"

From TidalCycles userbase
Jump to: navigation, search
(Created page with "Type: <source inline>[a -> Pattern b] -> a -> Pattern b</source>")
 
 
Line 1: Line 1:
 
[[Type signature|Type]]: <source inline>[a -> Pattern b] -> a -> Pattern b</source>
 
[[Type signature|Type]]: <source inline>[a -> Pattern b] -> a -> Pattern b</source>
 +
 +
The '''layer''' function allows you to layer up multiple functions on one pattern.
 +
 +
For example the following will play two versions of the pattern at the same time, one reversed and one at twice the speed.
 +
 +
<source>
 +
d1 $ layer [rev, fast 2] $ sound "arpy [~ arpy:4]"
 +
</source>
 +
 +
If you want to include the original version of the pattern in the layering, use the <source inline>id</source> function:
 +
 +
<source>
 +
d1 $ layer [id, rev, fast 2] $ sound "arpy [~ arpy:4]"
 +
</source>
 +
 +
== See also ==
 +
 +
This function is related to [[superimpose]], in particular <source inline>layer [id, rev]</source> is the same as <source inline>superimpose rev</source>.
 +
 +
[[Category:Functions]]

Latest revision as of 07:57, 11 March 2019

Type: [a -> Pattern b] -> a -> Pattern b

The layer function allows you to layer up multiple functions on one pattern.

For example the following will play two versions of the pattern at the same time, one reversed and one at twice the speed.

d1 $ layer [rev, fast 2] $ sound "arpy [~ arpy:4]"

If you want to include the original version of the pattern in the layering, use the id function:

d1 $ layer [id, rev, fast 2] $ sound "arpy [~ arpy:4]"

See also

This function is related to superimpose, in particular layer [id, rev] is the same as superimpose rev.