Difference between revisions of "slice"
From TidalCycles userbase
Line 18: | Line 18: | ||
''Note that the order of the first two parameters changed since tidal version 1.0.0'' | ''Note that the order of the first two parameters changed since tidal version 1.0.0'' | ||
+ | |||
+ | [[Type]]: <source inline>splice :: Int -> Pattern Int -> ControlPattern -> ControlPattern</source> | ||
+ | |||
+ | '''splice''' is similar to <source inline>slice</source>, but the slices are sped up or down to fit the slot in the target pattern. | ||
+ | |||
+ | <source> | ||
+ | d1 $ splice 8 "[<0*8 0*2> 3*4 2 4] [4 .. 7]" $ sound "breaks165" | ||
+ | </source> | ||
[[Category:Functions]] | [[Category:Functions]] |
Revision as of 20:07, 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
Type: splice :: Int -> Pattern Int -> ControlPattern -> ControlPattern
splice is similar to slice
, but the slices are sped up or down to fit the slot in the target pattern.
d1 $ splice 8 "[<0*8 0*2> 3*4 2 4] [4 .. 7]" $ sound "breaks165"