From 0e7c9a4001c3acf50c5f56f0c5555d95668fbbce Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 11:01:12 +0200 Subject: [PATCH] add vib examples for : notation --- packages/core/controls.mjs | 10 +++++++++- test/__snapshots__/examples.test.mjs.snap | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index edbb77d4..6cac6e54 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -649,10 +649,14 @@ const generic_params = [ * @example * note("a") * .vib("<.5 1 2 4 8 16>") + * @example + * // change the modulation depth with ":" + * note("a") + * .vib("<.5 1 2 4 8 16>:12") */ [['vib', 'vibmod'], 'vibrato', 'v'], /** - * Sets the vibrato depth in semitones. + * Sets the vibrato depth in semitones. Only has an effect if `vibrato` | `vib` | `v` is is also set * * @name vibmod * @synonyms vmod @@ -660,6 +664,10 @@ const generic_params = [ * @example * note("a").vib(4) * .vibmod("<.25 .5 1 2 12>") + * @example + * // change the vibrato frequency with ":" + * note("a") + * .vibmod("<.25 .5 1 2 12>:8") */ [['vibmod', 'vib'], 'vmod'], [['hcutoff', 'hresonance'], 'hpf', 'hp'], diff --git a/test/__snapshots__/examples.test.mjs.snap b/test/__snapshots__/examples.test.mjs.snap index 858e30e7..e026f9c4 100644 --- a/test/__snapshots__/examples.test.mjs.snap +++ b/test/__snapshots__/examples.test.mjs.snap @@ -4767,6 +4767,15 @@ exports[`runs examples > example "vib" example index 0 1`] = ` ] `; +exports[`runs examples > example "vib" example index 1 1`] = ` +[ + "[ 0/1 → 1/1 | note:a vib:0.5 vibmod:12 ]", + "[ 1/1 → 2/1 | note:a vib:1 vibmod:12 ]", + "[ 2/1 → 3/1 | note:a vib:2 vibmod:12 ]", + "[ 3/1 → 4/1 | note:a vib:4 vibmod:12 ]", +] +`; + exports[`runs examples > example "vibmod" example index 0 1`] = ` [ "[ 0/1 → 1/1 | note:a vib:4 vibmod:0.25 ]", @@ -4776,6 +4785,15 @@ exports[`runs examples > example "vibmod" example index 0 1`] = ` ] `; +exports[`runs examples > example "vibmod" example index 1 1`] = ` +[ + "[ 0/1 → 1/1 | note:a vibmod:0.25 vib:8 ]", + "[ 1/1 → 2/1 | note:a vibmod:0.5 vib:8 ]", + "[ 2/1 → 3/1 | note:a vibmod:1 vib:8 ]", + "[ 3/1 → 4/1 | note:a vibmod:2 vib:8 ]", +] +`; + exports[`runs examples > example "voicing" example index 0 1`] = ` [ "[ 0/1 → 1/1 | note:E4 ]",