doc: slice

This commit is contained in:
Felix Roos 2023-07-08 16:12:21 +02:00
parent fe6d99d4f1
commit 27643f4a48
2 changed files with 9 additions and 1 deletions

View File

@ -2240,14 +2240,18 @@ const _loopAt = function (factor, pat, cps = 1) {
.slow(factor);
};
/*
/**
* Chops samples into the given number of slices, triggering those slices with a given pattern of slice numbers.
* Instead of a number, it also accepts a list of numbers from 0 to 1 to slice at specific points.
* @name slice
* @memberof Pattern
* @returns Pattern
* @example
* await samples('github:tidalcycles/Dirt-Samples/master')
* s("breaks165").slice(8, "0 1 <2 2*2> 3 [4 0] 5 6 7".every(3, rev)).slow(1.5)
* @example
* await samples('github:tidalcycles/Dirt-Samples/master')
* s("breaks125/2").fit().slice([0,.25,.5,.75], "0 1 1 <2 3>")
*/
export const slice = register(

View File

@ -319,6 +319,10 @@ Sampler effects are functions that can be used to change the behaviour of sample
<JsDoc client:idle name="Pattern.chop" h={0} />
### slice
<JsDoc client:idle name="Pattern.slice" h={0} />
### speed
<JsDoc client:idle name="speed" h={0} />