This commit is contained in:
Jade (Rose) Rowland 2024-05-03 14:56:16 -04:00
parent 47b65846e9
commit 496d60dc1c
7 changed files with 98 additions and 9 deletions

View file

@ -17,9 +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) =>
superdough(hap2value(hap), t ? `=${t}` : deadline, hapDuration);
export const webaudioOutput = (hap, deadline, hapDuration, cps, t, cycle) => {
return superdough(hap2value(hap), t ? `=${t}` : deadline, hapDuration, cps, cycle);
};
Pattern.prototype.webaudio = function () {
return this.onTrigger(webaudioOutputTrigger);
};
@ -30,6 +30,7 @@ export function webaudioScheduler(options = {}) {
defaultOutput: webaudioOutput,
...options,
};
const { defaultOutput, getTime } = options;
return new strudel.Cyclist({
...options,