From d5dbc5c428c7f2b22cc2c288a2eddcfcc966e842 Mon Sep 17 00:00:00 2001 From: tyow Date: Sat, 14 Feb 2026 16:16:16 -0500 Subject: [PATCH] typo --- packages/core/pattern.mjs | 21 ++-- test/__snapshots__/examples.test.mjs.snap | 131 +++------------------- 2 files changed, 27 insertions(+), 125 deletions(-) diff --git a/packages/core/pattern.mjs b/packages/core/pattern.mjs index f393cdef7..2c1dcfce9 100644 --- a/packages/core/pattern.mjs +++ b/packages/core/pattern.mjs @@ -1061,10 +1061,10 @@ const COMPOSERS = { * combines `a` and `b` such that anything defined in `b` * and anything defined in `a` that is *not* defined in `b` * will be in the resulting pattern. - * - * The structure is maintained from `a`, - * because the default pattern alignment is `in`, - * see the section on `Pattern Alignment` + * + * The structure is maintained from `a`, + * because the default pattern alignment is `in`, + * see the section on `Pattern Alignment` * in the technical manual in the docs * * This is the inverse of `keep` @@ -1079,16 +1079,17 @@ const COMPOSERS = { * // because input pattern has `s` set, * // it overrides the "sine" declared earlier * note("c a f e").s("sine").set(s("triangle")) + */ set: [(a, b) => b], /** * When called on a pattern `a`, with a input pattern `b` (`a.keep(b)`), * combines `a` and `b` such that anything defined in `a`, * and anything defined in `b` that is *not* defined in `a` * will be in the resulting pattern - * - * The structure is maintained from `a`, - * because the default pattern alignment is `in`, - * see the section on `Pattern Alignment` + * + * The structure is maintained from `a`, + * because the default pattern alignment is `in`, + * see the section on `Pattern Alignment` * in the technical manual in the docs * * This is the inverse of `set` @@ -1100,8 +1101,8 @@ const COMPOSERS = { * @returns {Pattern} * @tags internal, combiners * @example - * // notes, already defined, will stay "c a f e", - * // while "s", not defined, will be set to "piano" + * // notes, already defined, will stay "c a f e", + * // while "s", not defined, will be set to "piano" * note("c a f e").keep(note("e f a c").s("piano")) */ keep: [(a) => a], diff --git a/test/__snapshots__/examples.test.mjs.snap b/test/__snapshots__/examples.test.mjs.snap index f733971fc..5d19a0bb0 100644 --- a/test/__snapshots__/examples.test.mjs.snap +++ b/test/__snapshots__/examples.test.mjs.snap @@ -3012,15 +3012,6 @@ exports[`runs examples > example "delayfeedback" example index 0 1`] = ` ] `; -exports[`runs examples > example "delayfeedback" example index 0 2`] = ` -[ - "[ 0/1 → 1/1 | s:bd delay:0.25 delayfeedback:0.25 ]", - "[ 1/1 → 2/1 | s:bd delay:0.25 delayfeedback:0.5 ]", - "[ 2/1 → 3/1 | s:bd delay:0.25 delayfeedback:0.75 ]", - "[ 3/1 → 4/1 | s:bd delay:0.25 delayfeedback:1 ]", -] -`; - exports[`runs examples > example "delayspeed" example index 0 1`] = ` [ "[ 0/1 → 1/8 | note:d s:sawtooth delay:0.8 delaytime:0.5 delayspeed:2 ]", @@ -6405,38 +6396,22 @@ exports[`runs examples > example "juxBy" example index 0 1`] = ` exports[`runs examples > example "keep" example index 0 1`] = ` [ - "[ 0/1 → 1/8 | value:0 note:c ]", - "[ 1/8 → 1/4 | value:0 note:c ]", - "[ 1/4 → 3/8 | value:0 note:a ]", - "[ 3/8 → 1/2 | value:0 note:a ]", - "[ 1/2 → 5/8 | value:0 note:f ]", - "[ 5/8 → 3/4 | value:0 note:f ]", - "[ 3/4 → 7/8 | value:0 note:e ]", - "[ 7/8 → 1/1 | value:0 note:e ]", - "[ 1/1 → 9/8 | value:0 note:c ]", - "[ 9/8 → 5/4 | value:0 note:c ]", - "[ 5/4 → 11/8 | value:0 note:a ]", - "[ 11/8 → 3/2 | value:0 note:a ]", - "[ 3/2 → 13/8 | value:0 note:f ]", - "[ 13/8 → 7/4 | value:0 note:f ]", - "[ 7/4 → 15/8 | value:0 note:e ]", - "[ 15/8 → 2/1 | value:0 note:e ]", - "[ 2/1 → 17/8 | value:0 note:c ]", - "[ 17/8 → 9/4 | value:0 note:c ]", - "[ 9/4 → 19/8 | value:0 note:a ]", - "[ 19/8 → 5/2 | value:0 note:a ]", - "[ 5/2 → 21/8 | value:0 note:f ]", - "[ 21/8 → 11/4 | value:0 note:f ]", - "[ 11/4 → 23/8 | value:0 note:e ]", - "[ 23/8 → 3/1 | value:0 note:e ]", - "[ 3/1 → 25/8 | value:0 note:c ]", - "[ 25/8 → 13/4 | value:0 note:c ]", - "[ 13/4 → 27/8 | value:0 note:a ]", - "[ 27/8 → 7/2 | value:0 note:a ]", - "[ 7/2 → 29/8 | value:0 note:f ]", - "[ 29/8 → 15/4 | value:0 note:f ]", - "[ 15/4 → 31/8 | value:0 note:e ]", - "[ 31/8 → 4/1 | value:0 note:e ]", + "[ 0/1 → 1/4 | note:c s:piano ]", + "[ 1/4 → 1/2 | note:a s:piano ]", + "[ 1/2 → 3/4 | note:f s:piano ]", + "[ 3/4 → 1/1 | note:e s:piano ]", + "[ 1/1 → 5/4 | note:c s:piano ]", + "[ 5/4 → 3/2 | note:a s:piano ]", + "[ 3/2 → 7/4 | note:f s:piano ]", + "[ 7/4 → 2/1 | note:e s:piano ]", + "[ 2/1 → 9/4 | note:c s:piano ]", + "[ 9/4 → 5/2 | note:a s:piano ]", + "[ 5/2 → 11/4 | note:f s:piano ]", + "[ 11/4 → 3/1 | note:e s:piano ]", + "[ 3/1 → 13/4 | note:c s:piano ]", + "[ 13/4 → 7/2 | note:a s:piano ]", + "[ 7/2 → 15/4 | note:f s:piano ]", + "[ 15/4 → 4/1 | note:e s:piano ]", ] `; @@ -11168,80 +11143,6 @@ exports[`runs examples > example "set" example index 0 1`] = ` ] `; -exports[`runs examples > example "set" example index 1 1`] = ` -[ - "[ (0/1 → 1/8) ⇝ 1/4 | note:c s:sine ]", - "[ 0/1 ⇜ (1/8 → 1/4) | note:c s:sine ]", - "[ (1/4 → 3/8) ⇝ 1/2 | note:c s:sine ]", - "[ 1/4 ⇜ (3/8 → 1/2) | note:c s:sine ]", - "[ (1/2 → 5/8) ⇝ 3/4 | note:a s:sine ]", - "[ 1/2 ⇜ (5/8 → 3/4) | note:a s:sine ]", - "[ (3/4 → 7/8) ⇝ 1/1 | note:a s:sine ]", - "[ 3/4 ⇜ (7/8 → 1/1) | note:a s:sine ]", - "[ (1/1 → 9/8) ⇝ 5/4 | note:c s:sine ]", - "[ 1/1 ⇜ (9/8 → 5/4) | note:c s:sine ]", - "[ (5/4 → 11/8) ⇝ 3/2 | note:c s:sine ]", - "[ 5/4 ⇜ (11/8 → 3/2) | note:c s:sine ]", - "[ (3/2 → 13/8) ⇝ 7/4 | note:a s:sine ]", - "[ 3/2 ⇜ (13/8 → 7/4) | note:a s:sine ]", - "[ (7/4 → 15/8) ⇝ 2/1 | note:a s:sine ]", - "[ 7/4 ⇜ (15/8 → 2/1) | note:a s:sine ]", - "[ (2/1 → 17/8) ⇝ 9/4 | note:c s:sine ]", - "[ 2/1 ⇜ (17/8 → 9/4) | note:c s:sine ]", - "[ (9/4 → 19/8) ⇝ 5/2 | note:c s:sine ]", - "[ 9/4 ⇜ (19/8 → 5/2) | note:c s:sine ]", - "[ (5/2 → 21/8) ⇝ 11/4 | note:a s:sine ]", - "[ 5/2 ⇜ (21/8 → 11/4) | note:a s:sine ]", - "[ (11/4 → 23/8) ⇝ 3/1 | note:a s:sine ]", - "[ 11/4 ⇜ (23/8 → 3/1) | note:a s:sine ]", - "[ (3/1 → 25/8) ⇝ 13/4 | note:c s:sine ]", - "[ 3/1 ⇜ (25/8 → 13/4) | note:c s:sine ]", - "[ (13/4 → 27/8) ⇝ 7/2 | note:c s:sine ]", - "[ 13/4 ⇜ (27/8 → 7/2) | note:c s:sine ]", - "[ (7/2 → 29/8) ⇝ 15/4 | note:a s:sine ]", - "[ 7/2 ⇜ (29/8 → 15/4) | note:a s:sine ]", - "[ (15/4 → 31/8) ⇝ 4/1 | note:a s:sine ]", - "[ 15/4 ⇜ (31/8 → 4/1) | note:a s:sine ]", -] -`; - -exports[`runs examples > example "set" example index 2 1`] = ` -[ - "[ 0/1 → 1/8 | value:0 note:c ]", - "[ 1/8 → 1/4 | value:0 note:c ]", - "[ 1/4 → 3/8 | value:0 note:a ]", - "[ 3/8 → 1/2 | value:0 note:a ]", - "[ 1/2 → 5/8 | value:0 note:f ]", - "[ 5/8 → 3/4 | value:0 note:f ]", - "[ 3/4 → 7/8 | value:0 note:e ]", - "[ 7/8 → 1/1 | value:0 note:e ]", - "[ 1/1 → 9/8 | value:0 note:c ]", - "[ 9/8 → 5/4 | value:0 note:c ]", - "[ 5/4 → 11/8 | value:0 note:a ]", - "[ 11/8 → 3/2 | value:0 note:a ]", - "[ 3/2 → 13/8 | value:0 note:f ]", - "[ 13/8 → 7/4 | value:0 note:f ]", - "[ 7/4 → 15/8 | value:0 note:e ]", - "[ 15/8 → 2/1 | value:0 note:e ]", - "[ 2/1 → 17/8 | value:0 note:c ]", - "[ 17/8 → 9/4 | value:0 note:c ]", - "[ 9/4 → 19/8 | value:0 note:a ]", - "[ 19/8 → 5/2 | value:0 note:a ]", - "[ 5/2 → 21/8 | value:0 note:f ]", - "[ 21/8 → 11/4 | value:0 note:f ]", - "[ 11/4 → 23/8 | value:0 note:e ]", - "[ 23/8 → 3/1 | value:0 note:e ]", - "[ 3/1 → 25/8 | value:0 note:c ]", - "[ 25/8 → 13/4 | value:0 note:c ]", - "[ 13/4 → 27/8 | value:0 note:a ]", - "[ 27/8 → 7/2 | value:0 note:a ]", - "[ 7/2 → 29/8 | value:0 note:f ]", - "[ 29/8 → 15/4 | value:0 note:f ]", - "[ 15/4 → 31/8 | value:0 note:e ]", - "[ 31/8 → 4/1 | value:0 note:e ]", -] -`; - exports[`runs examples > example "setDefaultJoin" example index 0 1`] = ` [ "[ 0/1 → 1/4 | s:saw velocity:1 note:F delay:0 ]",