rename repeat back to extend (#1285)
This commit is contained in:
parent
cf8203a4db
commit
3575fc3cc8
3 changed files with 36 additions and 36 deletions
|
|
@ -388,7 +388,7 @@ export class Pattern {
|
|||
|
||||
polyJoin = function () {
|
||||
const pp = this;
|
||||
return pp.fmap((p) => p.repeat(pp._steps.div(p._steps))).outerJoin();
|
||||
return pp.fmap((p) => p.extend(pp._steps.div(p._steps))).outerJoin();
|
||||
};
|
||||
|
||||
polyBind(func) {
|
||||
|
|
@ -2845,16 +2845,16 @@ export const drop = stepRegister('drop', function (i, pat) {
|
|||
/**
|
||||
* *Experimental*
|
||||
*
|
||||
* `repeat` is similar to `fast` in that it 'speeds up' the pattern, but it also increases the step count
|
||||
* accordingly. So `stepcat("a b".repeat(2), "c d")` would be the same as `"a b a b c d"`, whereas
|
||||
* `extend` is similar to `fast` in that it increases its density, but it also increases the step count
|
||||
* accordingly. So `stepcat("a b".extend(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"`.
|
||||
* @example
|
||||
* stepcat(
|
||||
* sound("bd bd - cp").repeat(2),
|
||||
* sound("bd bd - cp").extend(2),
|
||||
* sound("bd - sd -")
|
||||
* ).pace(8)
|
||||
*/
|
||||
export const repeat = stepRegister('repeat', function (factor, pat) {
|
||||
export const extend = stepRegister('extend', function (factor, pat) {
|
||||
return pat.fast(factor).expand(factor);
|
||||
});
|
||||
|
||||
|
|
@ -3066,8 +3066,8 @@ export const s_sub = drop;
|
|||
Pattern.prototype.s_sub = Pattern.prototype.drop;
|
||||
export const s_expand = expand;
|
||||
Pattern.prototype.s_expand = Pattern.prototype.expand;
|
||||
export const s_extend = repeat;
|
||||
Pattern.prototype.s_extend = Pattern.prototype.repeat;
|
||||
export const s_extend = extend;
|
||||
Pattern.prototype.s_extend = Pattern.prototype.extend;
|
||||
export const s_contract = contract;
|
||||
Pattern.prototype.s_contract = Pattern.prototype.contract;
|
||||
export const s_tour = tour;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue