Better export UI
This commit is contained in:
parent
418bca79b2
commit
ff83994733
8 changed files with 195 additions and 109 deletions
|
|
@ -112,14 +112,12 @@ export class Cyclist {
|
|||
this.setStarted(true);
|
||||
}
|
||||
|
||||
async exportAudio(begin, end) {
|
||||
async exportAudio(begin, end, sampleRate, downloadName = undefined) {
|
||||
if (!this.pattern) {
|
||||
throw new Error('Scheduler: no pattern set! call .setPattern first.');
|
||||
}
|
||||
logger('[cyclist] exporting');
|
||||
// this.clock.start();
|
||||
// this.setStarted(true);
|
||||
await renderPatternAudio(this.pattern, this.cps, begin, end)
|
||||
await renderPatternAudio(this.pattern, this.cps, begin, end, sampleRate, downloadName)
|
||||
}
|
||||
|
||||
pause() {
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ export function repl({
|
|||
|
||||
const stop = () => scheduler.stop();
|
||||
const start = () => scheduler.start();
|
||||
const exportAudio = async (begin, end) => await scheduler.exportAudio(begin, end);
|
||||
const exportAudio = async (begin, end, sampleRate, downloadName = undefined) => await scheduler.exportAudio(begin, end, sampleRate, downloadName);
|
||||
const pause = () => scheduler.pause();
|
||||
const toggle = () => scheduler.toggle();
|
||||
const setCps = (cps) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue