From f5c7b58b3a3919c043452666df9938979e87e953 Mon Sep 17 00:00:00 2001 From: "Jade (Rose) Rowland" Date: Thu, 29 Feb 2024 14:49:08 -0500 Subject: [PATCH] testing --- packages/superdough/synth.mjs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/superdough/synth.mjs b/packages/superdough/synth.mjs index e8df980e..fef3e0d7 100644 --- a/packages/superdough/synth.mjs +++ b/packages/superdough/synth.mjs @@ -41,10 +41,19 @@ export function registerSynthSounds() { freq = Number(freq); const node = getWorklet(ac, 'better-oscillator', { frequency: freq }); + const o = ac.createOscillator(); + o.start(t); + o.onended = () => { + console.log('here'); + o.disconnect(); + node.disconnect(); + }; return { node, - stop: (time) => {}, + stop: (time) => { + o.stop(time); + }, triggerRelease: (time) => { // envGain?.stop(time); },