mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-11 21:58:37 +00:00
hotfix: prebake flag to skip fetch
This commit is contained in:
parent
21b2184750
commit
8244ba7754
@ -1,7 +1,7 @@
|
||||
import { Pattern, toMidi } from '@strudel.cycles/core';
|
||||
import { samples } from '@strudel.cycles/webaudio';
|
||||
|
||||
export function prebake() {
|
||||
export function prebake(isMock = false) {
|
||||
samples(
|
||||
{
|
||||
piano: {
|
||||
@ -41,9 +41,11 @@ export function prebake() {
|
||||
// License: CC-by http://creativecommons.org/licenses/by/3.0/ Author: Alexander Holm
|
||||
'./piano/',
|
||||
);
|
||||
fetch('EmuSP12.json')
|
||||
.then(res => res.json())
|
||||
.then(json => samples(json, './EmuSP12/'));
|
||||
if (!isMock) {
|
||||
fetch('EmuSP12.json')
|
||||
.then((res) => res.json())
|
||||
.then((json) => samples(json, './EmuSP12/'));
|
||||
}
|
||||
}
|
||||
|
||||
const maxPan = toMidi('C8');
|
||||
|
||||
@ -123,7 +123,7 @@ const uiHelpersMocked = {
|
||||
backgroundImage: id,
|
||||
};
|
||||
|
||||
prebake();
|
||||
prebake(true);
|
||||
|
||||
// TODO: refactor to evalScope
|
||||
extend(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user