spessasus / SpessaSynth

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

[BUG] preset.getSamplesAndGenerators is not a function #12

Closed bastecklein closed 5 months ago

bastecklein commented 5 months ago

I was playing around with SpessaSynth last week following the "Using as a library" instructions, and was able to load the Sound Font parser and Synthetizer and play arbitrary notes from different sound fonts without issue.

This morning I noticed you had updated the library so I downloaded the latest code to try it out. I now get the following error when calling synth.noteOn, with no other changes to my code:

Screenshot 2024-06-17 06 36 07

I was not sure if there has been a change to the way the library is used or not.

Anyway, this is a cool project, I was having fun playing around with it!

bastecklein commented 5 months ago

Never mind, I found out that you now initialize the Synthetizer with an ArrayBuffer of the sound font instead of a SoundFont2 object as before. Seems to be working fine now. Sorry!

spessasus commented 5 months ago

Hi, Sorry for not updating the documentation earlier. I'm glad that you managed to figure it out yourself : )

spessasus commented 5 months ago

Essentially there was a complete internal rewrite that moved everything into the global scope and allowed offline audio rendering, and some methods had to be changed. If you notice any other documentation errors, feel free to open another issue.