WIP export UI
This commit is contained in:
parent
9a47e0f11e
commit
b3715dc5df
6 changed files with 134 additions and 17 deletions
|
|
@ -270,7 +270,7 @@ export class StrudelMirror {
|
|||
}
|
||||
async exportAudio(begin, end) {
|
||||
await this.repl.evaluate(this.code, false)
|
||||
this.repl.exportAudio(begin, end);
|
||||
await this.repl.exportAudio(begin, end);
|
||||
this.repl.scheduler.stop();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ export function repl({
|
|||
|
||||
const stop = () => scheduler.stop();
|
||||
const start = () => scheduler.start();
|
||||
const exportAudio = (begin, end) => scheduler.exportAudio(begin, end);
|
||||
const exportAudio = async (begin, end) => await scheduler.exportAudio(begin, end);
|
||||
const pause = () => scheduler.pause();
|
||||
const toggle = () => scheduler.toggle();
|
||||
const setCps = (cps) => {
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ export async function renderPatternAudio(pattern, cps, begin, end) {
|
|||
}
|
||||
})
|
||||
|
||||
context.startRendering().then(async (renderedBuffer) => {
|
||||
return context.startRendering().then(async (renderedBuffer) => {
|
||||
console.log(renderedBuffer)
|
||||
const wavBuffer = audioBufferToWav(renderedBuffer);
|
||||
const blob = new Blob([wavBuffer], { type: 'audio/wav' });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue