diff --git a/packages/superdough/superdough.mjs b/packages/superdough/superdough.mjs index c7864f70b..fe6be6c85 100644 --- a/packages/superdough/superdough.mjs +++ b/packages/superdough/superdough.mjs @@ -123,9 +123,9 @@ const defaultDefaultValues = { density: '.03', ftype: '12db', fanchor: 0, - resonance: .183, - hresonance: .183, - bandq: .183, + resonance: 0.183, + hresonance: 0.183, + bandq: 0.183, channels: [1, 2], phaserdepth: 0.75, shapevol: 1, @@ -183,8 +183,7 @@ export function getAudioContextCurrentTime() { return getAudioContext().currentTime; } function applyResonanceCurve(res) { - return Math.min(30.03, Math.pow(res * 5.48, 2)) - + return Math.min(30.03, Math.pow(res * 5.48, 2)); } let workletsLoading; @@ -530,10 +529,10 @@ export const superdough = async (value, t, hapDuration) => { compressorRelease, } = value; - resonance = applyResonanceCurve(resonance) - hresonance = applyResonanceCurve(hresonance) - bandq = applyResonanceCurve(bandq) - + resonance = applyResonanceCurve(resonance); + hresonance = applyResonanceCurve(hresonance); + bandq = applyResonanceCurve(bandq); + gain = applyGainCurve(nanFallback(gain, 1)); postgain = applyGainCurve(postgain); shapevol = applyGainCurve(shapevol);