mini: support stack with ","
This commit is contained in:
parent
f56d40ac8d
commit
3919a21650
3 changed files with 20 additions and 4 deletions
|
|
@ -5,9 +5,11 @@ import cx from './cx';
|
|||
import * as Tone from 'tone';
|
||||
import useCycle from './useCycle';
|
||||
import type { Hap, Pattern } from './types';
|
||||
import { tetris } from './tunes';
|
||||
import * as tunes from './tunes';
|
||||
import _mini from './mini';
|
||||
|
||||
const { tetris, tetrisMini } = tunes;
|
||||
|
||||
const { sequence, pure, reify, slowcat, fastcat, cat, stack, silence } = strudel; // make available to eval
|
||||
const mini = _mini; // for eval (direct import wont work somehow)
|
||||
const parse = (code: string): Pattern => eval(code);
|
||||
|
|
@ -21,7 +23,7 @@ synth.set({
|
|||
});
|
||||
|
||||
function App() {
|
||||
const [code, setCode] = useState<string>(tetris);
|
||||
const [code, setCode] = useState<string>(tetrisMini);
|
||||
const [log, setLog] = useState('');
|
||||
const logBox = useRef<any>();
|
||||
const [error, setError] = useState<Error>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue