Merge remote-tracking branch 'origin/ontrigger-refactoring' into daslyfe/gainmod

This commit is contained in:
Jade (Rose) Rowland 2025-07-05 00:45:58 -04:00
commit 077556e7cb
15 changed files with 17 additions and 42 deletions

View file

@ -74,6 +74,6 @@ export const dough = async (code) => {
worklet.node.connect(ac.destination);
};
export function doughTrigger(time_deprecate, hap, currentTime, cps, targetTime) {
export function doughTrigger(hap, currentTime, cps, targetTime) {
window.postMessage({ time: targetTime, dough: hap.value, currentTime, duration: hap.duration, cps });
}

View file

@ -451,8 +451,8 @@ function mapChannelNumbers(channels) {
}
export const superdough = async (value, t, hapDuration, cps = 0.5) => {
// new: t is always expected to be the absolute target onset time
const ac = getAudioContext();
t = typeof t === 'string' && t.startsWith('=') ? Number(t.slice(1)) : ac.currentTime + t;
let { stretch } = value;
if (stretch != null) {
//account for phase vocoder latency