adjust latency
This commit is contained in:
parent
0f24e97855
commit
0a6373f64c
4 changed files with 3 additions and 6 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue