mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 21:58:31 +00:00
clear sounds + cps on pattern change
+ similar to shuffle
This commit is contained in:
parent
b03bf9ec3d
commit
cec8553fb5
@ -247,9 +247,15 @@ export function Repl({ embedded = false }) {
|
||||
stop();
|
||||
}
|
||||
};
|
||||
const handleUpdate = (newCode) => {
|
||||
const handleUpdate = async (newCode, reset = false) => {
|
||||
if (reset) {
|
||||
clearCanvas();
|
||||
resetLoadedSounds();
|
||||
scheduler.setCps(1);
|
||||
await prebake(); // declare default samples
|
||||
}
|
||||
(newCode || isDirty) && activateCode(newCode);
|
||||
logger('[repl] code updated! tip: you can also update the code by pressing ctrl+enter', 'highlight');
|
||||
logger('[repl] code updated!');
|
||||
};
|
||||
|
||||
const handleShuffle = async () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user