Compare commits

...

6 Commits

Author SHA1 Message Date
froos 7179066a68 Merge branch 'main' into daslyfe/jade/rescurve 2025-10-20 20:39:35 +02:00
Jade (Rose) Rowland fe5cebc435 add res curve setter 2025-07-08 22:39:31 -04:00
Felix Roos 2ea0053edf Merge branch 'main' into daslyfe/jade/rescurve 2025-07-06 21:43:35 +02:00
Jade (Rose) Rowland 3f76da7ad8 Merge branch 'main' into daslyfe/jade/rescurve 2025-06-27 15:58:43 -04:00
Jade (Rose) Rowland 4e6ca54ef3 lint 2025-05-02 22:51:44 -04:00
Jade (Rose) Rowland 525f5d87d1 adj resonance 2025-05-02 22:50:00 -04:00
+16 -3
View File
@@ -148,9 +148,9 @@ let defaultDefaultValues = {
density: '.03',
ftype: '12db',
fanchor: 0,
resonance: 1,
hresonance: 1,
bandq: 1,
resonance: 0.183,
hresonance: 0.183,
bandq: 0.183,
channels: [1, 2],
phaserdepth: 0.75,
shapevol: 1,
@@ -207,6 +207,16 @@ export function registerWorklet(url) {
externalWorklets.push(url);
}
let resCurveFunc = (res) => Math.min(30.03, Math.pow(res * 5.48, 2));
export function setResCurve(newFunc) {
resCurveFunc = newFunc;
}
function applyResonanceCurve(res) {
return resCurveFunc(res);
}
let workletsLoading;
function loadWorklets() {
if (!workletsLoading) {
@@ -483,6 +493,9 @@ export const superdough = async (value, t, hapDuration, cps = 0.5, cycle = 0.5)
compressorRelease,
} = value;
resonance = applyResonanceCurve(resonance);
hresonance = applyResonanceCurve(hresonance);
bandq = applyResonanceCurve(bandq);
delaytime = delaytime ?? cycleToSeconds(delaysync, cps);
const orbitChannels = mapChannelNumbers(