mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-13 14:26:58 -04:00
move unpure up
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user