some clarification comments

This commit is contained in:
Felix Roos 2025-07-04 22:17:23 +02:00
parent e3680b96de
commit 34771f03d4
No known key found for this signature in database
3 changed files with 2 additions and 1 deletions

View file

@ -67,6 +67,7 @@ export class Cyclist {
// the following line is dumb and only here for backwards compatibility // the following line is dumb and only here for backwards compatibility
// see https://codeberg.org/uzu/strudel/pulls/1004 // see https://codeberg.org/uzu/strudel/pulls/1004
const deadline = targetTime - phase; const deadline = targetTime - phase;
// this onTrigger has another signature
onTrigger?.(hap, deadline, duration, this.cps, targetTime); onTrigger?.(hap, deadline, duration, this.cps, targetTime);
if (hap.value.cps !== undefined && this.cps != hap.value.cps) { if (hap.value.cps !== undefined && this.cps != hap.value.cps) {
this.cps = hap.value.cps; this.cps = hap.value.cps;

View file

@ -245,6 +245,7 @@ export function repl({
export const getTrigger = export const getTrigger =
({ getTime, defaultOutput }) => ({ getTime, defaultOutput }) =>
async (hap, deadline, duration, cps, t) => { async (hap, deadline, duration, cps, t) => {
// ^ this signature is different from hap.context.onTrigger, as set by Pattern.onTrigger(onTrigger)
// TODO: get rid of deadline after https://codeberg.org/uzu/strudel/pulls/1004 // TODO: get rid of deadline after https://codeberg.org/uzu/strudel/pulls/1004
try { try {
if (!hap.context.onTrigger || !hap.context.dominantTrigger) { if (!hap.context.onTrigger || !hap.context.dominantTrigger) {

View file

@ -647,7 +647,6 @@
"evaluate" "evaluate"
], ],
"/packages/webaudio/webaudio.mjs": [ "/packages/webaudio/webaudio.mjs": [
"webaudioOutputTrigger",
"webaudioOutput", "webaudioOutput",
"webaudioRepl" "webaudioRepl"
], ],