began soundfont implementation
This commit is contained in:
parent
b353db67d4
commit
82d6103907
8 changed files with 2144 additions and 263 deletions
13
packages/soundfonts/convert.js
Normal file
13
packages/soundfonts/convert.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
// 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://surikov.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));
|
||||
Loading…
Add table
Add a link
Reference in a new issue