encapsulate .dough

This commit is contained in:
Felix Roos 2023-09-25 22:39:03 +02:00
parent 6e26f39751
commit 52c01abbe9
2 changed files with 8 additions and 7 deletions

View file

@ -5,7 +5,7 @@ This program is free software: you can redistribute it and/or modify it under th
*/
import * as strudel from '@strudel.cycles/core';
import { superdough, getAudioContext, setLogger } from 'superdough';
import { superdough, getAudioContext, setLogger, doughTrigger } from 'superdough';
const { Pattern, logger } = strudel;
setLogger(logger);
@ -35,3 +35,7 @@ export function webaudioScheduler(options = {}) {
onTrigger: strudel.getTrigger({ defaultOutput, getTime }),
});
}
Pattern.prototype.dough = function () {
return this.onTrigger(doughTrigger, 1);
};