From e051d383a07f54a7064e8cb67ce84e05f1de7ca9 Mon Sep 17 00:00:00 2001 From: fnordomat <46D46D1246803312401472B5A7427E237B7908CA> Date: Sat, 13 Jan 2024 11:07:59 +0100 Subject: [PATCH 1/4] add 10 new vowel qualities to formant table --- packages/superdough/vowel.mjs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/superdough/vowel.mjs b/packages/superdough/vowel.mjs index 25357642..dd2fd52d 100644 --- a/packages/superdough/vowel.mjs +++ b/packages/superdough/vowel.mjs @@ -5,6 +5,16 @@ export var vowelFormant = { i: { freqs: [270, 1850, 2900, 3350, 3590], gains: [1, 0.0631, 0.0631, 0.0158, 0.0158], qs: [40, 90, 100, 120, 120] }, o: { freqs: [430, 820, 2700, 3000, 3300], gains: [1, 0.3162, 0.0501, 0.0794, 0.01995], qs: [40, 80, 100, 120, 120] }, u: { freqs: [370, 630, 2750, 3000, 3400], gains: [1, 0.1, 0.0708, 0.0316, 0.01995], qs: [40, 60, 100, 120, 120] }, + ae: { freqs: [650, 1515, 2400, 3000, 3350], gains: [1, 0.5, 0.1008, 0.0631, 0.0126], qs: [80, 90, 120, 130, 140] }, + aa: { freqs: [560, 900, 2570, 3000, 3300], gains: [1, 0.5, 0.0708, 0.0631, 0.0126], qs: [80, 90, 120, 130, 140] }, + oe: { freqs: [500, 1430, 2300, 3000, 3300], gains: [1, 0.2, 0.0708, 0.0316, 0.01995], qs: [40, 60, 100, 120, 120] }, + ue: { freqs: [250, 1750, 2150, 3200, 3300], gains: [1, 0.1, 0.0708, 0.0316, 0.01995], qs: [40, 60, 100, 120, 120] }, + y: { freqs: [400, 1460, 2400, 3000, 3300], gains: [1, 0.2, 0.0708, 0.0316, 0.02995], qs: [40, 60, 100, 120, 120] }, + uh: { freqs: [600, 1250, 2100, 3100, 3500], gains: [1, 0.3, 0.0608, 0.0316, 0.01995], qs: [40, 70, 100, 120, 130] }, + un: { freqs: [500, 1240, 2280, 3000, 3500], gains: [1, 0.1, 0.1708, 0.0216, 0.02995], qs: [40, 60, 100, 120, 120] }, + en: { freqs: [600, 1480, 2450, 3200, 3300], gains: [1, 0.15, 0.0708, 0.0316, 0.02995], qs: [40, 60, 100, 120, 120] }, + an: { freqs: [700, 1050, 2500, 3000, 3300], gains: [1, 0.1, 0.0708, 0.0316, 0.02995], qs: [40, 60, 100, 120, 120] }, + on: { freqs: [500, 1080, 2350, 3000, 3300], gains: [1, 0.1, 0.0708, 0.0316, 0.02995], qs: [40, 60, 100, 120, 120] }, }; if (typeof GainNode !== 'undefined') { class VowelNode extends GainNode { From 6232560273e5bafbb65854f02d7d5914470cd887 Mon Sep 17 00:00:00 2001 From: fnordomat <46D46D1246803312401472B5A7427E237B7908CA> Date: Sat, 13 Jan 2024 11:07:59 +0100 Subject: [PATCH 2/4] document extra vowels in quick reference --- packages/core/controls.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index d979ff23..f449f85f 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -1209,7 +1209,7 @@ const generic_params = [ * Formant filter to make things sound like vowels. * * @name vowel - * @param {string | Pattern} vowel You can use a e i o u. + * @param {string | Pattern} vowel You can use a e i o u ae aa oe ue y uh un en an on, corresponding to [a] [e] [i] [o] [u] [æ] [ɑ] [ø] [y] [ɯ] [ʌ] [œ̃] [ɛ̃] [ɑ̃] [ɔ̃]. * @example * note("c2 >").s('sawtooth') * .vowel(">") From efa0737660b9d13ba127ed6eaea6db8d35053afa Mon Sep 17 00:00:00 2001 From: fnordomat <46D46D1246803312401472B5A7427E237B7908CA> Date: Sat, 13 Jan 2024 15:11:30 +0100 Subject: [PATCH 3/4] added some aliases for the vowels (cosmetics) --- packages/core/controls.mjs | 2 +- packages/superdough/vowel.mjs | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index f449f85f..8605d7be 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -1209,7 +1209,7 @@ const generic_params = [ * Formant filter to make things sound like vowels. * * @name vowel - * @param {string | Pattern} vowel You can use a e i o u ae aa oe ue y uh un en an on, corresponding to [a] [e] [i] [o] [u] [æ] [ɑ] [ø] [y] [ɯ] [ʌ] [œ̃] [ɛ̃] [ɑ̃] [ɔ̃]. + * @param {string | Pattern} vowel You can use a e i o u ae aa oe ue y uh un en an on, corresponding to [a] [e] [i] [o] [u] [æ] [ɑ] [ø] [y] [ɯ] [ʌ] [œ̃] [ɛ̃] [ɑ̃] [ɔ̃]. Aliases: aa = å = ɑ, oe = ø = ö, y = ı, ae = æ. * @example * note("c2 >").s('sawtooth') * .vowel(">") diff --git a/packages/superdough/vowel.mjs b/packages/superdough/vowel.mjs index dd2fd52d..7d5dac4a 100644 --- a/packages/superdough/vowel.mjs +++ b/packages/superdough/vowel.mjs @@ -15,6 +15,14 @@ export var vowelFormant = { en: { freqs: [600, 1480, 2450, 3200, 3300], gains: [1, 0.15, 0.0708, 0.0316, 0.02995], qs: [40, 60, 100, 120, 120] }, an: { freqs: [700, 1050, 2500, 3000, 3300], gains: [1, 0.1, 0.0708, 0.0316, 0.02995], qs: [40, 60, 100, 120, 120] }, on: { freqs: [500, 1080, 2350, 3000, 3300], gains: [1, 0.1, 0.0708, 0.0316, 0.02995], qs: [40, 60, 100, 120, 120] }, + get æ() { return this.ae; }, + get ø() { return this.oe; }, + get ɑ() { return this.aa; }, + get å() { return this.aa; }, + get ö() { return this.oe; }, + get ü() { return this.ue; }, + get ı() { return this.y; }, + }; if (typeof GainNode !== 'undefined') { class VowelNode extends GainNode { From 70712bdab653825507e5334c9dcb99cf0f2430c3 Mon Sep 17 00:00:00 2001 From: fnordomat <46D46D1246803312401472B5A7427E237B7908CA> Date: Sun, 14 Jan 2024 10:19:49 +0100 Subject: [PATCH 4/4] fix codeformat --- packages/superdough/vowel.mjs | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/packages/superdough/vowel.mjs b/packages/superdough/vowel.mjs index 7d5dac4a..3f30aef1 100644 --- a/packages/superdough/vowel.mjs +++ b/packages/superdough/vowel.mjs @@ -15,14 +15,27 @@ export var vowelFormant = { en: { freqs: [600, 1480, 2450, 3200, 3300], gains: [1, 0.15, 0.0708, 0.0316, 0.02995], qs: [40, 60, 100, 120, 120] }, an: { freqs: [700, 1050, 2500, 3000, 3300], gains: [1, 0.1, 0.0708, 0.0316, 0.02995], qs: [40, 60, 100, 120, 120] }, on: { freqs: [500, 1080, 2350, 3000, 3300], gains: [1, 0.1, 0.0708, 0.0316, 0.02995], qs: [40, 60, 100, 120, 120] }, - get æ() { return this.ae; }, - get ø() { return this.oe; }, - get ɑ() { return this.aa; }, - get å() { return this.aa; }, - get ö() { return this.oe; }, - get ü() { return this.ue; }, - get ı() { return this.y; }, - + get æ() { + return this.ae; + }, + get ø() { + return this.oe; + }, + get ɑ() { + return this.aa; + }, + get å() { + return this.aa; + }, + get ö() { + return this.oe; + }, + get ü() { + return this.ue; + }, + get ı() { + return this.y; + }, }; if (typeof GainNode !== 'undefined') { class VowelNode extends GainNode {