This commit is contained in:
Felix Roos 2022-02-27 12:08:23 +01:00
parent ef3ab6161f
commit 9442b5c66b
9 changed files with 107 additions and 90 deletions

4
docs/dist/App.js vendored
View file

@ -14,7 +14,7 @@ try {
} catch (err) {
console.warn("failed to decode", err);
}
const defaultSynth = new Tone.PolySynth().chain(new Tone.Gain(0.5), Tone.Destination);
const defaultSynth = new Tone.PolySynth().chain(new Tone.Gain(0.5), Tone.getDestination());
defaultSynth.set({
oscillator: {type: "triangle"},
envelope: {
@ -32,7 +32,7 @@ function App() {
const {setCode, setPattern, error, code, cycle, dirty, log, togglePlay, activateCode, pattern, pushLog} = useRepl({
tune: decoded || randomTune,
defaultSynth,
onEvent: useCallback(markEvent(editor), [editor])
onDraw: useCallback(markEvent(editor), [editor])
});
const logBox = useRef();
useLayoutEffect(() => {