From 70472f11ccf70452e5b7f17e2b9a4428a4427009 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 27 Feb 2022 12:48:15 +0100 Subject: [PATCH] build with setContext (highlighting broken..) --- docs/dist/App.js | 1 + repl/src/App.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/dist/App.js b/docs/dist/App.js index 47e39bb1..3f0571f6 100644 --- a/docs/dist/App.js +++ b/docs/dist/App.js @@ -14,6 +14,7 @@ try { } catch (err) { console.warn("failed to decode", err); } +Tone.setContext(new Tone.Context({latencyHint: "playback", lookAhead: 0.5})); const defaultSynth = new Tone.PolySynth().chain(new Tone.Gain(0.5), Tone.getDestination()); defaultSynth.set({ oscillator: {type: "triangle"}, diff --git a/repl/src/App.tsx b/repl/src/App.tsx index 4ab51ce4..4bf61bcc 100644 --- a/repl/src/App.tsx +++ b/repl/src/App.tsx @@ -18,7 +18,7 @@ try { console.warn('failed to decode', err); } // "balanced" | "interactive" | "playback"; -// Tone.setContext(new Tone.Context({ latencyHint: 'balanced', lookAhead: 0.5 })); +Tone.setContext(new Tone.Context({ latencyHint: 'playback', lookAhead: 0.5 })); const defaultSynth = new Tone.PolySynth().chain(new Tone.Gain(0.5), Tone.getDestination()); defaultSynth.set({ oscillator: { type: 'triangle' },