mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-27 23:38:49 -04:00
proper setup minirepl
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
import { evalScope, controls } from '@strudel.cycles/core';
|
||||
import { samples } from '@strudel.cycles/webaudio';
|
||||
import { initAudioOnFirstClick } from '@strudel.cycles/webaudio';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { prebake } from '../repl/prebake';
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
fetch('https://strudel.tidalcycles.org/EmuSP12.json')
|
||||
.then((res) => res.json())
|
||||
.then((json) => samples(json, 'https://strudel.tidalcycles.org/EmuSP12/'));
|
||||
|
||||
evalScope(
|
||||
controls,
|
||||
import('@strudel.cycles/core'),
|
||||
@@ -20,6 +17,11 @@ if (typeof window !== 'undefined') {
|
||||
);
|
||||
}
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
initAudioOnFirstClick();
|
||||
prebake();
|
||||
}
|
||||
|
||||
export function MiniRepl({ tune }) {
|
||||
const [Repl, setRepl] = useState();
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user