mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-20 18:18:32 +00:00
Merge remote-tracking branch 'upstream/main' into pickr-pickrmod
This commit is contained in:
commit
ed1f3e1e8c
@ -253,6 +253,11 @@ function effectSend(input, effect, wet) {
|
|||||||
return send;
|
return send;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function resetGlobalEffects() {
|
||||||
|
delays = {};
|
||||||
|
reverbs = {};
|
||||||
|
}
|
||||||
|
|
||||||
export const superdough = async (value, deadline, hapDuration) => {
|
export const superdough = async (value, deadline, hapDuration) => {
|
||||||
const ac = getAudioContext();
|
const ac = getAudioContext();
|
||||||
if (typeof value !== 'object') {
|
if (typeof value !== 'object') {
|
||||||
|
|||||||
@ -7,7 +7,13 @@ This program is free software: you can redistribute it and/or modify it under th
|
|||||||
import { code2hash, getDrawContext, logger, silence } from '@strudel/core';
|
import { code2hash, getDrawContext, logger, silence } from '@strudel/core';
|
||||||
import cx from '@src/cx.mjs';
|
import cx from '@src/cx.mjs';
|
||||||
import { transpiler } from '@strudel/transpiler';
|
import { transpiler } from '@strudel/transpiler';
|
||||||
import { getAudioContext, initAudioOnFirstClick, webaudioOutput } from '@strudel/webaudio';
|
import {
|
||||||
|
getAudioContext,
|
||||||
|
initAudioOnFirstClick,
|
||||||
|
webaudioOutput,
|
||||||
|
resetGlobalEffects,
|
||||||
|
resetLoadedSounds,
|
||||||
|
} from '@strudel/webaudio';
|
||||||
import { defaultAudioDeviceName } from '../settings.mjs';
|
import { defaultAudioDeviceName } from '../settings.mjs';
|
||||||
import { getAudioDevices, setAudioDevice } from './util.mjs';
|
import { getAudioDevices, setAudioDevice } from './util.mjs';
|
||||||
import { StrudelMirror, defaultSettings } from '@strudel/codemirror';
|
import { StrudelMirror, defaultSettings } from '@strudel/codemirror';
|
||||||
@ -157,6 +163,7 @@ export function Repl({ embedded = false }) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const resetEditor = async () => {
|
const resetEditor = async () => {
|
||||||
|
resetGlobalEffects();
|
||||||
clearCanvas();
|
clearCanvas();
|
||||||
resetLoadedSounds();
|
resetLoadedSounds();
|
||||||
editorRef.current.repl.setCps(0.5);
|
editorRef.current.repl.setCps(0.5);
|
||||||
@ -183,6 +190,7 @@ export function Repl({ embedded = false }) {
|
|||||||
setViewingPatternData(patternData);
|
setViewingPatternData(patternData);
|
||||||
clearCanvas();
|
clearCanvas();
|
||||||
resetLoadedSounds();
|
resetLoadedSounds();
|
||||||
|
resetGlobalEffects();
|
||||||
await prebake(); // declare default samples
|
await prebake(); // declare default samples
|
||||||
editorRef.current.setCode(code);
|
editorRef.current.setCode(code);
|
||||||
editorRef.current.repl.evaluate(code);
|
editorRef.current.repl.evaluate(code);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user