mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-11 13:48:40 +00:00
Merge pull request #1248 from daslyfe/fixbeatdoc
fix docs for beat function
This commit is contained in:
commit
52ebfa1d09
@ -3119,9 +3119,9 @@ Pattern.prototype.xfade = function (pos, b) {
|
||||
* especially useful for creating rhythms
|
||||
* @name beat
|
||||
* @example
|
||||
* s("bd").beat("0:7:10", 16)
|
||||
* s("bd").beat("0,7,10", 16)
|
||||
* @example
|
||||
* s("sd").beat("4:12", 16)
|
||||
* s("sd").beat("4,12", 16)
|
||||
*/
|
||||
const __beat = (join) => (t, div, pat) => {
|
||||
t = Fraction(t).mod(div);
|
||||
|
||||
@ -957,18 +957,30 @@ exports[`runs examples > example "bank" example index 0 1`] = `
|
||||
exports[`runs examples > example "beat" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/16 | s:bd ]",
|
||||
"[ 7/16 → 1/2 | s:bd ]",
|
||||
"[ 5/8 → 11/16 | s:bd ]",
|
||||
"[ 1/1 → 17/16 | s:bd ]",
|
||||
"[ 23/16 → 3/2 | s:bd ]",
|
||||
"[ 13/8 → 27/16 | s:bd ]",
|
||||
"[ 2/1 → 33/16 | s:bd ]",
|
||||
"[ 39/16 → 5/2 | s:bd ]",
|
||||
"[ 21/8 → 43/16 | s:bd ]",
|
||||
"[ 3/1 → 49/16 | s:bd ]",
|
||||
"[ 55/16 → 7/2 | s:bd ]",
|
||||
"[ 29/8 → 59/16 | s:bd ]",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "beat" example index 1 1`] = `
|
||||
[
|
||||
"[ 1/48 → 1/12 | s:sd ]",
|
||||
"[ 49/48 → 13/12 | s:sd ]",
|
||||
"[ 97/48 → 25/12 | s:sd ]",
|
||||
"[ 145/48 → 37/12 | s:sd ]",
|
||||
"[ 1/4 → 5/16 | s:sd ]",
|
||||
"[ 3/4 → 13/16 | s:sd ]",
|
||||
"[ 5/4 → 21/16 | s:sd ]",
|
||||
"[ 7/4 → 29/16 | s:sd ]",
|
||||
"[ 9/4 → 37/16 | s:sd ]",
|
||||
"[ 11/4 → 45/16 | s:sd ]",
|
||||
"[ 13/4 → 53/16 | s:sd ]",
|
||||
"[ 15/4 → 61/16 | s:sd ]",
|
||||
]
|
||||
`;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user