adjust latency

This commit is contained in:
Jade (Rose) Rowland 2024-04-06 17:40:08 -04:00
parent 0f24e97855
commit 0a6373f64c
4 changed files with 3 additions and 6 deletions

View file

@ -17,9 +17,8 @@ const hap2value = (hap) => {
export const webaudioOutputTrigger = (t, hap, ct, cps) => superdough(hap2value(hap), t - ct, hap.duration / cps, cps);
// uses more precise, absolute t if available, see https://github.com/tidalcycles/strudel/pull/1004
export const webaudioOutput = (hap, deadline, hapDuration, cps, t) => {
export const webaudioOutput = (hap, deadline, hapDuration, cps, t) =>
superdough(hap2value(hap), t ? `=${t}` : deadline, hapDuration);
};
Pattern.prototype.webaudio = function () {
return this.onTrigger(webaudioOutputTrigger);