mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-24 20:18:34 +00:00
automatically run onTrigger in scheduler
This commit is contained in:
parent
badc4bcc2f
commit
87de8c0800
@ -18,10 +18,12 @@ export class Scheduler {
|
|||||||
if (!e.part.begin.equals(e.whole.begin)) {
|
if (!e.part.begin.equals(e.whole.begin)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (e.context.onTrigger) {
|
||||||
|
// TODO: kill first param, as it's contained in e
|
||||||
|
e.context.onTrigger(e.whole.begin, e, audioContext.currentTime, 1 /* cps */);
|
||||||
|
}
|
||||||
if (onEvent) {
|
if (onEvent) {
|
||||||
onEvent?.(e);
|
onEvent?.(e);
|
||||||
} else {
|
|
||||||
console.warn('unplayable event: no audio node nor onEvent callback', e);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user