diff --git a/packages/core/pattern.mjs b/packages/core/pattern.mjs index c1b39820..bf2dcd1d 100644 --- a/packages/core/pattern.mjs +++ b/packages/core/pattern.mjs @@ -826,16 +826,6 @@ export class Pattern { return sequence(this, ...pats); } - /** - * Appends the given pattern(s) to the current pattern. - * @name seq - * @memberof Pattern - * @synonyms sequence, fastcat - * @example - * s("hh*4").seq( - * note("c4(5,8)") - * ) - */ seq(...pats) { return sequence(this, ...pats); } @@ -1471,12 +1461,19 @@ export function sequence(...pats) { } /** Like **cat**, but the items are crammed into one cycle. - * @synonyms fastcat, sequence + * @name seq + * @memberof Pattern + * @synonyms sequence, fastcat * @example * seq("e5", "b4", ["d5", "c5"]).note() * // "e5 b4 [d5 c5]".note() * + * // Or as a chained function: + * s("hh*4").seq( + * note("c4(5,8)") + * ) */ + export function seq(...pats) { return fastcat(...pats); } diff --git a/test/__snapshots__/examples.test.mjs.snap b/test/__snapshots__/examples.test.mjs.snap index f4e6f56e..d0e68d9e 100644 --- a/test/__snapshots__/examples.test.mjs.snap +++ b/test/__snapshots__/examples.test.mjs.snap @@ -7016,27 +7016,6 @@ exports[`runs examples > example "seq" example index 0 1`] = ` ] `; -exports[`runs examples > example "seq" example index 0 2`] = ` -[ - "[ 0/1 → 1/3 | note:e5 ]", - "[ 1/3 → 2/3 | note:b4 ]", - "[ 2/3 → 5/6 | note:d5 ]", - "[ 5/6 → 1/1 | note:c5 ]", - "[ 1/1 → 4/3 | note:e5 ]", - "[ 4/3 → 5/3 | note:b4 ]", - "[ 5/3 → 11/6 | note:d5 ]", - "[ 11/6 → 2/1 | note:c5 ]", - "[ 2/1 → 7/3 | note:e5 ]", - "[ 7/3 → 8/3 | note:b4 ]", - "[ 8/3 → 17/6 | note:d5 ]", - "[ 17/6 → 3/1 | note:c5 ]", - "[ 3/1 → 10/3 | note:e5 ]", - "[ 10/3 → 11/3 | note:b4 ]", - "[ 11/3 → 23/6 | note:d5 ]", - "[ 23/6 → 4/1 | note:c5 ]", -] -`; - exports[`runs examples > example "seqPLoop" example index 0 1`] = ` [ "[ 0/1 → 1/8 | s:bd ]",