Some non-standard updates have been made to the SF2 format by various tools to support compressed samples. I know there's already sf2pack, but that requires the entire sample stream to be compressed as one long sample, and this new "SF3" format has the advantage that samples are compressed individually, allowing for easier partial extraction. The changes to the format have been documented here:
https://github.com/FluidSynth/fluidsynth/wiki/SoundFont3FormatIn summary:
- ifil chunk major version bumped from 2 to 3
- Sample data chunk no longer padded to even size (including the LIST chunk it's contained in)
- Sample type 0x10 indicates a compressed sample
- Currently supported are Vorbis and FLAC samples (the latter obviously being more interesting).
Here's a tool that can write these files:
https://github.com/KKQ-KKQ/sf2convert/releases/tag/v2.0.1Note that there's also an "SF4" option in that tool, which is probably not too important and should be ignored. Initially SF3 only supported Vorbis, so someone went ahead and added FLAC support by bumping the major version to 4. Obviously that's not a very nice solution, so as documented on the FluidSynth wiki, it's preferable to use SF3 for FLAC samples instead.
Would it be possible to add support to xmp-midi (and BASSMIDI) for SF3? As BASSMIDI already supports arbitrary codecs through sf2pack, I suppose there's not much holding back this integration on the technical side.