Expose scheduler state and don't enqueue/trigger midi keys when repl stopped
This commit is contained in:
parent
b954a25b2b
commit
80875cca95
3 changed files with 23 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue