mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 05:38:34 +00:00
14 lines
388 B
JavaScript
14 lines
388 B
JavaScript
// this script converts a soundfont into a json file, it has not been not used yet
|
|
import fetch from 'node-fetch';
|
|
|
|
const name = '0000_JCLive';
|
|
|
|
const js = await fetch(`https://felixroos.github.io/webaudiofontdata/sound/${name}_sf2_file.js`).then((res) =>
|
|
res.text(),
|
|
);
|
|
// console.log(js);
|
|
|
|
let [_, data] = js.split('_sf2_file=');
|
|
data = eval(data);
|
|
console.log(JSON.stringify(data));
|