Difference between revisions of "slice"
From TidalCycles userbase
Line 1: | Line 1: | ||
[[Type]]: <source inline>Pattern Int -> Pattern Int -> ControlPattern -> ControlPattern</source> | [[Type]]: <source inline>Pattern Int -> Pattern Int -> ControlPattern -> ControlPattern</source> | ||
− | '''slice''' is similar to [[chop]] and [[striate]], in that it's used to slice up | + | '''slice''' is similar to [[chop]] and [[striate]], in that it's used to slice samples up into bits. The difference is that it allows you to rearrange those bits as a pattern. |
<source> | <source> | ||
Line 15: | Line 15: | ||
</source> | </source> | ||
− | ''Note that the order of the first two parameters changed | + | See also [[bite]], which is similar but slices up patterns, rather than samples. |
+ | |||
+ | ''Note that the order of the first two parameters changed since tidal version 1.0.0'' | ||
[[Category:Functions]] | [[Category:Functions]] |
Revision as of 07:27, 18 April 2019
Type: Pattern Int -> Pattern Int -> ControlPattern -> ControlPattern
slice is similar to chop and striate, in that it's used to slice samples up into bits. The difference is that it allows you to rearrange those bits as a pattern.
d1 $ slice 8 "7 6 5 4 3 2 1 0" $ sound "breaks165"
# legato 1
The above slices the sample into eight bits, and then plays them backwards, equivalent of applying rev $ chop 8
. Here's a more complex example:
d1 $ slice 8 "[<0*8 0*2> 3*4 2 4] [4 .. 7]" $ sound "breaks165"
# legato 1
See also bite, which is similar but slices up patterns, rather than samples.
Note that the order of the first two parameters changed since tidal version 1.0.0