Format
This commit is contained in:
parent
91ebdd5ea6
commit
8f9967c76d
3 changed files with 8 additions and 10 deletions
|
|
@ -15,7 +15,7 @@ import {
|
||||||
initAudio,
|
initAudio,
|
||||||
setSuperdoughAudioController,
|
setSuperdoughAudioController,
|
||||||
resetGlobalEffects,
|
resetGlobalEffects,
|
||||||
errorLogger
|
errorLogger,
|
||||||
} from 'superdough';
|
} from 'superdough';
|
||||||
import './supradough.mjs';
|
import './supradough.mjs';
|
||||||
import { workletUrl } from 'supradough';
|
import { workletUrl } from 'supradough';
|
||||||
|
|
@ -54,8 +54,8 @@ export async function renderPatternAudio(
|
||||||
setSuperdoughAudioController(new SuperdoughAudioController(audioContext));
|
setSuperdoughAudioController(new SuperdoughAudioController(audioContext));
|
||||||
await initAudio({
|
await initAudio({
|
||||||
maxPolyphony,
|
maxPolyphony,
|
||||||
multiChannelOrbits
|
multiChannelOrbits,
|
||||||
})
|
});
|
||||||
logger('[webaudio] preloading');
|
logger('[webaudio] preloading');
|
||||||
|
|
||||||
let haps = pattern.queryArc(begin, end, { _cps: cps });
|
let haps = pattern.queryArc(begin, end, { _cps: cps });
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,7 @@ import cx from '@src/cx.mjs';
|
||||||
import NumberInput from './NumberInput';
|
import NumberInput from './NumberInput';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { Textbox } from './textbox/Textbox';
|
import { Textbox } from './textbox/Textbox';
|
||||||
import {
|
import { getAudioContext } from '@strudel/webaudio';
|
||||||
getAudioContext,
|
|
||||||
} from '@strudel/webaudio';
|
|
||||||
import XMarkIcon from '@heroicons/react/24/outline/XMarkIcon';
|
import XMarkIcon from '@heroicons/react/24/outline/XMarkIcon';
|
||||||
|
|
||||||
function Checkbox({ label, value, onChange, disabled = false }) {
|
function Checkbox({ label, value, onChange, disabled = false }) {
|
||||||
|
|
@ -215,7 +213,7 @@ export default function ExportModal(Props) {
|
||||||
<div
|
<div
|
||||||
className="absolute top-0 left-0 right-0 bottom-0 backdrop-invert"
|
className="absolute top-0 left-0 right-0 bottom-0 backdrop-invert"
|
||||||
style={{
|
style={{
|
||||||
width: `${(exporting ? 1 : 0) + (progress / length) * 99}%`
|
width: `${(exporting ? 1 : 0) + (progress / length) * 99}%`,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<span className="text-foreground">{exporting ? 'Exporting...' : 'Export to WAV'}</span>
|
<span className="text-foreground">{exporting ? 'Exporting...' : 'Export to WAV'}</span>
|
||||||
|
|
|
||||||
|
|
@ -219,13 +219,13 @@ export function useReplContext() {
|
||||||
multiChannelOrbits,
|
multiChannelOrbits,
|
||||||
downloadName,
|
downloadName,
|
||||||
).finally(async () => {
|
).finally(async () => {
|
||||||
const { latestCode, maxPolyphony, audioDeviceName, multiChannelOrbits } = settingsMap.get()
|
const { latestCode, maxPolyphony, audioDeviceName, multiChannelOrbits } = settingsMap.get();
|
||||||
await initAudio({
|
await initAudio({
|
||||||
latestCode,
|
latestCode,
|
||||||
maxPolyphony,
|
maxPolyphony,
|
||||||
audioDeviceName,
|
audioDeviceName,
|
||||||
multiChannelOrbits
|
multiChannelOrbits,
|
||||||
})
|
});
|
||||||
editorRef.current.repl.scheduler.stop();
|
editorRef.current.repl.scheduler.stop();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue