replacing fenv by lpenv, hpenv, bpenv

This commit is contained in:
Raphael Forment 2023-09-10 09:28:07 +02:00
parent c5fb247de6
commit bea9a3c2dc

View File

@ -179,15 +179,16 @@ export const superdough = async (value, deadline, hapDuration) => {
gain = 0.8, gain = 0.8,
// filters // filters
order = '12db', order = '12db',
fenv,
// low pass // low pass
cutoff, cutoff,
lpenv,
lpattack = 0.01, lpattack = 0.01,
lpdecay = 0.5, lpdecay = 0.5,
lpsustain = 0.6, lpsustain = 0.6,
lprelease = 0.01, lprelease = 0.01,
resonance = 1, resonance = 1,
// high pass // high pass
hpenv,
hcutoff, hcutoff,
hpattack = 0.01, hpattack = 0.01,
hpdecay = 0.5, hpdecay = 0.5,
@ -195,6 +196,7 @@ export const superdough = async (value, deadline, hapDuration) => {
hprelease = 0.01, hprelease = 0.01,
hresonance = 1, hresonance = 1,
// band pass // band pass
bpenv,
bandf, bandf,
bpattack = 0.01, bpattack = 0.01,
bpdecay = 0.5, bpdecay = 0.5,
@ -256,7 +258,7 @@ export const superdough = async (value, deadline, hapDuration) => {
if (cutoff !== undefined) { if (cutoff !== undefined) {
let lp = () => let lp = () =>
createFilter(ac, 'lowpass', cutoff, resonance, lpattack, lpdecay, lpsustain, lprelease, fenv, t, t + hapDuration); createFilter(ac, 'lowpass', cutoff, resonance, lpattack, lpdecay, lpsustain, lprelease, lpenv, t, t + hapDuration);
chain.push(lp()); chain.push(lp());
if (order === '24db') { if (order === '24db') {
chain.push(lp()); chain.push(lp());
@ -274,7 +276,7 @@ export const superdough = async (value, deadline, hapDuration) => {
hpdecay, hpdecay,
hpsustain, hpsustain,
hprelease, hprelease,
fenv, hpenv,
t, t,
t + hapDuration, t + hapDuration,
); );
@ -286,7 +288,7 @@ export const superdough = async (value, deadline, hapDuration) => {
if (bandf !== undefined) { if (bandf !== undefined) {
let bp = () => let bp = () =>
createFilter(ac, 'bandpass', bandf, bandq, bpattack, bpdecay, bpsustain, bprelease, fenv, t, t + hapDuration); createFilter(ac, 'bandpass', bandf, bandq, bpattack, bpdecay, bpsustain, bprelease, bpenv, t, t + hapDuration);
chain.push(bp()); chain.push(bp());
if (order === '24db') { if (order === '24db') {
chain.push(bp()); chain.push(bp());