move unpure up

This commit is contained in:
Felix Roos
2025-09-21 16:13:09 +02:00
parent 86248328cc
commit 452827630b
+8 -7
View File
@@ -74,6 +74,14 @@ export function repl({
return silence;
};
// helper to get a patternified pure value out
function unpure(pat) {
if (pat._Pattern) {
return pat.__pure;
}
return pat;
}
const setPattern = async (pattern, autostart = true) => {
pattern = editPattern?.(pattern) || pattern;
await scheduler.setPattern(pattern, autostart);
@@ -90,13 +98,6 @@ export function repl({
return silence;
};
function unpure(pat) {
if (pat._Pattern) {
return pat.__pure;
}
return pat;
}
/**
* Changes the global tempo to the given cycles per minute
*