mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-30 16:33:19 -04:00
Format
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -204,7 +204,14 @@ export default function ExportModal(Props) {
|
||||
setStrudelMaxPolyphony(maxPolyphony);
|
||||
setStrudelMultiChannelOrbits(multiChannelOrbits);
|
||||
setTimeout(refreshProgress, 1000);
|
||||
await handleExport(startCycle, endCycle, sampleRate, maxPolyphony, multiChannelOrbits, downloadName).finally(() => {
|
||||
await handleExport(
|
||||
startCycle,
|
||||
endCycle,
|
||||
sampleRate,
|
||||
maxPolyphony,
|
||||
multiChannelOrbits,
|
||||
downloadName,
|
||||
).finally(() => {
|
||||
setExporting(false);
|
||||
const modal = document.getElementById('exportModal');
|
||||
setProgress(0);
|
||||
|
||||
Reference in New Issue
Block a user