Fix osc timing, and send cps, cycle and delta

This commit is contained in:
alex
2022-05-15 18:49:32 +01:00
parent ee5bc0f3a6
commit f2e1ee1aac
2 changed files with 16 additions and 5 deletions
+8 -1
View File
@@ -57,7 +57,14 @@ function useRepl({ tune, defaultSynth, autolink = true, onEvent, onDraw: onDrawP
/* console.warn('no instrument chosen', event);
throw new Error(`no instrument chosen for ${JSON.stringify(event)}`); */
} else {
onTrigger(time, event, currentTime);
onTrigger(
time,
event,
currentTime,
1 /* cps */,
event.wholeOrPart().begin.valueOf(),
event.duration.valueOf(),
);
}
} catch (err) {
console.warn(err);