move core repl + add package

This commit is contained in:
Felix Roos 2022-04-01 20:54:54 +02:00
parent 47a046ca1d
commit 7fb9c3bf1e
9 changed files with 8982 additions and 154 deletions

View file

@ -1,7 +1,12 @@
import { Pattern } from '@strudel.cycles/core';
let audioContext;
export const getAudioContext = () => audioContext || new AudioContext();
export const getAudioContext = () => {
if (!audioContext) {
audioContext = new AudioContext();
}
return audioContext;
};
const lookahead = 0.2;