From bbc8ef009d0bcfe656247adc2bd9300d39ef911f Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 18 Mar 2022 22:12:31 +0100 Subject: [PATCH] proper reset --- repl/src/static.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/repl/src/static.mjs b/repl/src/static.mjs index 7f988908..a11ed992 100644 --- a/repl/src/static.mjs +++ b/repl/src/static.mjs @@ -11,6 +11,8 @@ import { evaluate } from './evaluate'; // so all glitches that appear here should have nothing to do with strudel and or the repl async function playStatic(code) { + Tone.getTransport().cancel(); + Tone.getTransport().stop(); let start, took; const seconds = Number(prompt('How many seconds to run?')) || 60; start = performance.now(); @@ -19,7 +21,6 @@ async function playStatic(code) { took = performance.now() - start; console.log('evaluate took', took, 'ms'); console.log('querying..'); - Tone.getTransport().stop(); start = performance.now(); const events = pat ?.query(new State(new TimeSpan(0, seconds)))