From 7a3bea6f9087105ed0be0982798b9dd26c9ed089 Mon Sep 17 00:00:00 2001 From: Aria Date: Sun, 16 Nov 2025 19:38:59 -0600 Subject: [PATCH] Working version --- packages/core/pattern.mjs | 5 +++-- website/src/pages/learn/synths.mdx | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/core/pattern.mjs b/packages/core/pattern.mjs index f08667cf..cd8c5871 100644 --- a/packages/core/pattern.mjs +++ b/packages/core/pattern.mjs @@ -3653,10 +3653,11 @@ export const parray = (pats) => { * .partials(binaryL(256)) */ export const { partials } = register('partials', (list, pat) => { + debugger; if (Array.isArray(list)) { list = parray(list); } - return pat.withValue((v) => ({...v, partials: list})); + return pat.withValue((v) => (l) => ({...v, partials: l})).appLeft(list); }); /** @@ -3673,5 +3674,5 @@ export const { phases } = register('phases', (list, pat) => { if (Array.isArray(list)) { list = parray(list); } - return pat.withValue((v) => ({...v, phases: list})); + return pat.withValue((v) => (l) => ({...v, phases: l})).appLeft(list); }); diff --git a/website/src/pages/learn/synths.mdx b/website/src/pages/learn/synths.mdx index 1a65568d..b209dc9c 100644 --- a/website/src/pages/learn/synths.mdx +++ b/website/src/pages/learn/synths.mdx @@ -96,6 +96,16 @@ note("c2 >".fast(2)) ._scope()`} /> +and with lists _of_ patterns: + +>".fast(4)) +.sound("user") +.partials([1, 0, "0 1", "0 1 0.3", rand]) +._scope()`} +/> + Note that the first value in the `partials` array controls the magnitude of the fundamental harmonic rather than the DC offset, which is fixed at 0. #### Phases