From 16e9aca2221a08a5c01fd45649b5967f35a4312c Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Tue, 15 Jul 2025 09:33:14 +0200 Subject: [PATCH 1/2] fix: can now use def in mondough --- packages/mondough/mondough.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/mondough/mondough.mjs b/packages/mondough/mondough.mjs index 6e8278939..15feb5d86 100644 --- a/packages/mondough/mondough.mjs +++ b/packages/mondough/mondough.mjs @@ -42,6 +42,7 @@ lib['%'] = pace; lib['?'] = degradeBy; // todo: default 0.5 not working.. lib[':'] = tail; lib['..'] = range; +lib['def'] = () => silence; lib['or'] = (...children) => chooseIn(...children); // always has structure but is cyclewise.. e.g. "s oh*8.dec[.04 | .5]" //lib['or'] = (...children) => chooseOut(...children); // "s oh*8.dec[.04 | .5]" is better but "dec[.04 | .5].s oh*8" has no struct From 1fdd87a4f3c4b0ede205d149edfca1325c5bdf78 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Tue, 15 Jul 2025 09:35:24 +0200 Subject: [PATCH 2/2] doc: def --- website/src/pages/learn/mondo-notation.mdx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/website/src/pages/learn/mondo-notation.mdx b/website/src/pages/learn/mondo-notation.mdx index 3b00b9902..e2b0c4027 100644 --- a/website/src/pages/learn/mondo-notation.mdx +++ b/website/src/pages/learn/mondo-notation.mdx @@ -176,3 +176,16 @@ $ chord # voicing /> The `$` sign is an alias for `,` so it will create a stack behind the scenes. + +## variables + +using the `def` keyword, you can define variables: + +