use fetch instead of import
This commit is contained in:
parent
b11003c472
commit
669fce36e9
1 changed files with 3 additions and 2 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
import { Pattern, toMidi } from '@strudel.cycles/core';
|
import { Pattern, toMidi } from '@strudel.cycles/core';
|
||||||
import { samples } from '@strudel.cycles/webaudio';
|
import { samples } from '@strudel.cycles/webaudio';
|
||||||
import EmuSP12 from '../public/EmuSP12.json' assert {type: "json"};
|
|
||||||
|
|
||||||
export function prebake() {
|
export function prebake() {
|
||||||
samples(
|
samples(
|
||||||
|
|
@ -42,7 +41,9 @@ export function prebake() {
|
||||||
// License: CC-by http://creativecommons.org/licenses/by/3.0/ Author: Alexander Holm
|
// License: CC-by http://creativecommons.org/licenses/by/3.0/ Author: Alexander Holm
|
||||||
'./piano/',
|
'./piano/',
|
||||||
);
|
);
|
||||||
samples(EmuSP12, './EmuSP12/');
|
fetch('EmuSP12.json')
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(json => samples(json, './EmuSP12/'));
|
||||||
}
|
}
|
||||||
|
|
||||||
const maxPan = toMidi('C8');
|
const maxPan = toMidi('C8');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue