add new flavour under replicate
This commit is contained in:
parent
57f2a97b7b
commit
c2a5562bad
1 changed files with 18 additions and 0 deletions
|
|
@ -2995,6 +2995,24 @@ export const drop = stepRegister('drop', function (i, pat) {
|
||||||
* ).pace(8)
|
* ).pace(8)
|
||||||
*/
|
*/
|
||||||
export const extend = stepRegister('extend', function (factor, pat) {
|
export const extend = stepRegister('extend', function (factor, pat) {
|
||||||
|
return pat.fast(factor).expand(factor);
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* *Experimental*
|
||||||
|
*
|
||||||
|
* `replicate` is similar to `fast` in that it increases its density, but it also increases the step count
|
||||||
|
* accordingly. So `stepcat("a b".replicate(2), "c d")` would be the same as `"a b a b c d"`, whereas
|
||||||
|
* `stepcat("a b".fast(2), "c d")` would be the same as `"[a b] [a b] c d"`.
|
||||||
|
*
|
||||||
|
* TODO: find out how this function differs from extend
|
||||||
|
* @example
|
||||||
|
* stepcat(
|
||||||
|
* sound("bd bd - cp").replicate(2),
|
||||||
|
* sound("bd - sd -")
|
||||||
|
* ).pace(8)
|
||||||
|
*/
|
||||||
|
export const replicate = stepRegister('replicate', function (factor, pat) {
|
||||||
return pat.repeatCycles(factor).fast(factor).expand(factor);
|
return pat.repeatCycles(factor).fast(factor).expand(factor);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue