Expose scheduler state and don't enqueue/trigger midi keys when repl stopped

This commit is contained in:
Aria 2026-01-14 11:44:48 -06:00
parent b954a25b2b
commit 80875cca95
3 changed files with 23 additions and 3 deletions

View file

@ -8,6 +8,7 @@ let time;
let cpsFunc;
let pattern;
let triggerFunc;
let isStarted;
export function getTime() {
if (!time) {
throw new Error('no time set! use setTime to define a time source');
@ -42,3 +43,11 @@ export function setTriggerFunc(func) {
export function getTriggerFunc() {
return triggerFunc;
}
export function setIsStarted(val) {
isStarted = !!val;
}
export function getIsStarted() {
return isStarted;
}