Hey - 

I've been building an SFZ reader with Juce, which is working out very well.  And, I've been hoping to expand it to read SF2 files (since there are for more of those out there).

What I can't figure out is how to decompress the SF2 files into something readable.  Are SF2s some sort of custom compression algorithm?  Surely we can unzip this thing into a bunch of wav and text files ... no?


I've been scraping the internet all morning looking for C++ examples of how to read SF2 files and coming up with nothing.  Surely, someone has done this in Juce?

Maybe I'm missing something obvious, anyone have experience with this?







Yeah - but that isn't really the question.


The problem is not that I don't have a spec, it's that the file isn't readable as a text file (I see the RIFF data, but no other keywords seem present in any of the SF2 files I've looked at, it seems to be just binary data).


Am I wrong about this?  I've looked through a number of files now, but maybe missed something obvious.


Anyone have experience with SF2s?


I don't understand what you mean about text files. It's a binary format - how/why would text files be involved in parsing it?


Aha.  Yeah, I see now.  I can read it with File::readAsData, and then iterate though it as a character array.

Quite a bit more paintful than reading an SFZ file though, and now I'm starting to notice that SF2s don't sound nearly as good as SFZ fonts.

It seems that SFZ is a more advanced format.  Plus, of course, it's non-monolithic and human readable (text instead of binary).


Anyway, just figuring all this out.  Thanks for the reality check.