mirror of
https://codeberg.org/uzu/strudel
synced 2026-08-13 00:50:31 -04:00
Remove webaudio from core dependencies
This commit is contained in:
@@ -9,6 +9,7 @@ import { getDrawContext } from '@strudel/draw';
|
||||
import { transpiler } from '@strudel/transpiler';
|
||||
import {
|
||||
getAudioContextCurrentTime,
|
||||
renderPatternAudio,
|
||||
webaudioOutput,
|
||||
resetGlobalEffects,
|
||||
resetLoadedSounds,
|
||||
@@ -203,8 +204,11 @@ export function useReplContext() {
|
||||
const handleEvaluate = () => {
|
||||
editorRef.current.evaluate();
|
||||
};
|
||||
|
||||
const handleExport = async (begin, end, sampleRate, downloadName = undefined) => {
|
||||
await editorRef.current.exportAudio(begin, end, sampleRate, downloadName);
|
||||
await editorRef.current.evaluate();
|
||||
await renderPatternAudio(editorRef.current.repl.state.pattern, editorRef.current.repl.scheduler.cps, begin, end, sampleRate, downloadName)
|
||||
editorRef.current.repl.scheduler.stop();
|
||||
};
|
||||
const handleShuffle = async () => {
|
||||
const patternData = await getRandomTune();
|
||||
|
||||
Reference in New Issue
Block a user