spessasus / SpessaSynth

MIDI SoundFont/DLS synthesizer library written in JavaScript.
https://spessasus.github.io/SpessaSynth/
Other
96 stars 12 forks source link

Soundfont issue #1

Closed 0xSYS closed 1 year ago

0xSYS commented 1 year ago

I've been trying to use the midi player but I really wonder why the soundfonts folder is not even existing. Can you tell me where is supposted to be located?

spessasus commented 1 year ago

Currently, the soundfonts folder isn't created by the program. You have to create it yourself, in the same place where the "src" folder is. Then, simply put your soundfont named "soundfont.sf2" there, and it should work : )

PS: I highly recommend to use the recommended soundfont, since I'm testing with it and it seems to work pretty well.

0xSYS commented 1 year ago

Oohh I figured out that but now I keep getting this error: Uncaught (in promise) ReferenceError: manager is not defined at main.js:82:9

And it dosen't play the midi

spessasus commented 1 year ago

I see. You should wait for the soundfont to load, before attempting to play your MIDI file. From the error you have provided, it seems that the program didn't yet load the soundfont and didn't initialize the manager in time. You can see the progress bar at the top when the website opens. Simply refresh it, and when the text at the top says "Press anywhere to start the app", then try uploading your midi to the program. That should work : )

0xSYS commented 1 year ago

UUmmm something is not right with the sf parser Uncaught TypeError: Cannot read properties of undefined (reading 'presetName') at SoundFont2.getPreset (soundfont_parser.js:155:78) at new Synthetizer (synthetizer.js:28:45) at new Manager (manager.js:43:22) at document.body.onclick (main.js:95:30)

spessasus commented 1 year ago

Strange... What soundfont are you using?

0xSYS commented 1 year ago

This 1: https://www.mediafire.com/file/2e4ezkh83ztpr5r/Keppy%2527s_Steinway_Piano_7.2.sf2/file

I'll try a different 1

spessasus commented 1 year ago

The one you sent doesn't seem to work with FluidSynth either. Maybe it's corrupted? Anyways, you should try the recommended one, as it's high quality too. And it works because I've tested it multiple times.

spessasus commented 1 year ago

Alright, I've got Your soundfont working. The issue was with the sm24 chunk, but it loads now. Update to the latest release via git pull and enjoy :)