Format
This commit is contained in:
parent
6baca67cd3
commit
fe70a2df43
2 changed files with 18 additions and 2 deletions
|
|
@ -39,7 +39,16 @@ export const webaudioOutput = (hap, _deadline, hapDuration, cps, t) => {
|
|||
return superdough(hap2value(hap), t, hapDuration, cps, hap.whole?.begin.valueOf());
|
||||
};
|
||||
|
||||
export async function renderPatternAudio(pattern, cps, begin, end, sampleRate, maxPolyphony, multiChannelOrbits, downloadName = undefined) {
|
||||
export async function renderPatternAudio(
|
||||
pattern,
|
||||
cps,
|
||||
begin,
|
||||
end,
|
||||
sampleRate,
|
||||
maxPolyphony,
|
||||
multiChannelOrbits,
|
||||
downloadName = undefined,
|
||||
) {
|
||||
let audioContext = getAudioContext();
|
||||
await audioContext.close();
|
||||
audioContext = new OfflineAudioContext(2, ((end - begin) / cps) * sampleRate, sampleRate);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue