mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-23 11:38:37 +00:00
doc: degradeBy
This commit is contained in:
parent
88e39d22f1
commit
8e61673bd6
@ -223,6 +223,18 @@ Pattern.prototype._degradeByWith = function (withPat, x) {
|
|||||||
return this.fmap((a) => (_) => a).appLeft(withPat._filterValues((v) => v > x));
|
return this.fmap((a) => (_) => a).appLeft(withPat._filterValues((v) => v > x));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Randomly removes events from the pattern by a given amount.
|
||||||
|
* 0 = 0% chance of removal
|
||||||
|
* 1 = 100% chance of removal
|
||||||
|
*
|
||||||
|
* @name degradeBy
|
||||||
|
* @memberof Pattern
|
||||||
|
* @param {number} amount - a number between 0 and 1
|
||||||
|
* @returns Pattern
|
||||||
|
* @example
|
||||||
|
* s("hh*8").degradeBy(0.5).out()
|
||||||
|
*/
|
||||||
Pattern.prototype._degradeBy = function (x) {
|
Pattern.prototype._degradeBy = function (x) {
|
||||||
return this._degradeByWith(rand, x);
|
return this._degradeByWith(rand, x);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -450,6 +450,8 @@ Stacks the given pattern to the current pattern:
|
|||||||
|
|
||||||
<MiniRepl tune={`"c4,eb4,g4".stack("bb4,d5")`} />
|
<MiniRepl tune={`"c4,eb4,g4".stack("bb4,d5")`} />
|
||||||
|
|
||||||
|
{{ 'Pattern.degradeBy' | jsdoc }}
|
||||||
|
|
||||||
## Tone API
|
## Tone API
|
||||||
|
|
||||||
To make the sounds more interesting, we can use Tone.js instruments ands effects.
|
To make the sounds more interesting, we can use Tone.js instruments ands effects.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user