This commit is contained in:
Jade (Rose) Rowland 2024-04-06 17:07:54 -04:00
parent 4086df95b7
commit 8e4549d6d3
5 changed files with 15 additions and 9 deletions

View file

@ -17,8 +17,9 @@ 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);