spessasus / SpessaSynth

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

[FEATURE REQUEST] Export to DLS, from SF2 -> DLS #64

Closed gnaomo closed 1 week ago

gnaomo commented 1 month ago

Is your feature request related to a problem? Please describe. Would be cool to have a DLS export too, from SF2, may be something very difficult tho i have no idea

Is your feature related to the sound library or the app/website? Sound library

Describe the solution you'd like SF2 to DLS Convert, ability to export to a DLS file.

Describe alternatives you've considered Awave Studio is the only solution I found but it's 90$ and the trial version has the export option disabled

Additional context

spessasus commented 1 month ago

Hm, that's an interesting idea! It shouldn't be too difficult to implement, except for the fact that there's not a thing like presets in DLS (only instruments, 1 zone deep, unlike 2 in SF2), so the program should add the values and zones manually. That's doable.

Though, I would need a DLS synth to test with. The only other one than spessa is Winamp's MIDI player. Can you name a DLS synth that I could test with?

Note: fluidsynth and synthfont both are not correctly implementing DLS parameters, so these don't count.

gnaomo commented 1 month ago

tried looking up on the web but i didn't find anything else.

i know that Fruity LSD on FL Studio is widely used, but i don't think it's adequate

spessasus commented 1 month ago

According to the internet, only DLS 1 is supported there, but sf2 will use DLS 2 since 1 limits all parameters to the global zone.

But I'll try to implement your suggestion, I'll test it in Winamp.

spessasus commented 1 month ago

It's a bit more difficult than I thought... but I'm working on it. Check branch write-dls for progress.

spessasus commented 3 weeks ago

Well, no. I've hit a roadblock. There's a hard limit on generators in an SF2 file (around 65k), and combining the zones (even smart parameter globalization) exceeds 100k on complex soundfonts like generaluserGS. Even if this will make a valid DLS file, it won't be able to be loaded by spessasynth.

spessasus commented 1 week ago

Hi, @gnaomo I've managed to make it work, though it's limited, and complex soundfonts will not be able to be converted back into SF2. Additionally, fluidsynth for some reason rejects these files, while other software (Awave studio) seems to work fine.

You can read more about this here: https://github.com/spessasus/SpessaSynth/wiki/DLS-Conversion-Problem

spessasus commented 17 hours ago

Hi,

I'm pleased to let you know that as of 3.23.6, winamp loads the DLS files exported by Spessasynth. Even as large as 1GB!