default cycle
This commit is contained in:
parent
16b2fc0632
commit
63fcce79e0
3 changed files with 3 additions and 4 deletions
|
|
@ -45,7 +45,7 @@ export class NeoCyclist {
|
||||||
const timeUntilTrigger = cycleToSeconds(hap.whole.begin - this.cycle, this.cps);
|
const timeUntilTrigger = cycleToSeconds(hap.whole.begin - this.cycle, this.cps);
|
||||||
const targetTime = timeUntilTrigger + currentTime + this.latency;
|
const targetTime = timeUntilTrigger + currentTime + this.latency;
|
||||||
const duration = cycleToSeconds(hap.duration, this.cps);
|
const duration = cycleToSeconds(hap.duration, this.cps);
|
||||||
onTrigger?.(hap, 0, duration, this.cps, targetTime, this.cycle);
|
onTrigger?.(hap, 0, duration, this.cps, targetTime);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -482,7 +482,7 @@ function mapChannelNumbers(channels) {
|
||||||
return (Array.isArray(channels) ? channels : [channels]).map((ch) => ch - 1);
|
return (Array.isArray(channels) ? channels : [channels]).map((ch) => ch - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const superdough = async (value, t, hapDuration, cps = 0.5, cycle) => {
|
export const superdough = async (value, t, hapDuration, cps = 0.5, cycle = 0.5) => {
|
||||||
// new: t is always expected to be the absolute target onset time
|
// new: t is always expected to be the absolute target onset time
|
||||||
const ac = getAudioContext();
|
const ac = getAudioContext();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,7 @@ export const webaudioOutput = (hap, _deadline, hapDuration, cps, t) => {
|
||||||
t,
|
t,
|
||||||
hapDuration,
|
hapDuration,
|
||||||
cps,
|
cps,
|
||||||
hap.whole.begin.valueOf(),
|
hap.whole?.begin.valueOf(),
|
||||||
// cycle
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue