From c9fda97534093e6a101455bb75af1b8ffdaadee9 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Thu, 30 Jun 2022 17:13:59 +0200 Subject: [PATCH] add prebake to maxirepl --- talk/MaxiRepl.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/talk/MaxiRepl.jsx b/talk/MaxiRepl.jsx index b10fc5a95..ca185a3f4 100644 --- a/talk/MaxiRepl.jsx +++ b/talk/MaxiRepl.jsx @@ -6,6 +6,7 @@ import { materialPalenightLarge } from './materialPalenightThemeLarge'; import { useState, useEffect } from 'react'; import { cleanupDraw, cleanupUi, Tone, piano } from '@strudel.cycles/tone'; import { midi2note } from '@strudel.cycles/core'; +import { prebake } from '../repl/src/prebake.mjs'; let defaultPiano; piano().then((instrument) => { @@ -30,6 +31,7 @@ loadWebDirt({ sampleMapUrl: './samples.json', sampleFolder: './EmuSP12', }); +prebake(); export function MaxiRepl({ code, canvasHeight = 500 }) { const [exampleIndex, setExampleIndex] = useState(0); @@ -41,6 +43,7 @@ export function MaxiRepl({ code, canvasHeight = 500 }) { useEffect(() => { cleanupDraw(); cleanupUi(); + prebake(); }, [exampleIndex]); return (