Hello! I generated a custom soundfont using MIDI.js tools, and placed it inside my public folder (I'm using Svelte)
When creating the new instrument, I tried the following:
let inst = Soundfont.instrument(ac, 'http://localhost:8080/soundfonts/acoustic_grand_piano-mp3.js');let inst = Soundfont.instrument(ac, './soundfonts/acoustic_grand_piano-mp3.js');
And they both throw:
Uncaught TypeError: Cannot perform ArrayBuffer.prototype.slice on a detached ArrayBuffer
at ArrayBuffer.slice (<anonymous>)
at AudioContext.<anonymous> (index.js:68:64)
Hello! I generated a custom soundfont using MIDI.js tools, and placed it inside my public folder (I'm using Svelte) When creating the new instrument, I tried the following:
let inst = Soundfont.instrument(ac, 'http://localhost:8080/soundfonts/acoustic_grand_piano-mp3.js');
let inst = Soundfont.instrument(ac, './soundfonts/acoustic_grand_piano-mp3.js');
And they both throw:
Do you have any idea what it could be?
Here's the generated js file too, just in case acoustic_grand_piano-mp3.txt
Thank you!