Can't load a 3,9gb sf2 into OpenMPT.

Started by sc00p, September 15, 2019, 10:45:18

Previous topic - Next topic

sc00p

Yesterday i was trying to figure out how to open this particular sf2 file (https://drive.google.com/file/d/1xDRoWyNPzIphO4ueVmEsdMalGq98FxXF/view?usp=drive_web) flawlessy, but i had no luck.
First of all, i was using the 32bit version of OpenMPT, which crashed upon dragging the .sf2 file into the file explorer sidebar. I had to update my 64bit version in order to get it imported without crashing. Tough, considering it has a lot of instrument banks included, i can't get to play most of the instruments while with Polyphone (sf2 editor) i can play the instruments flawlessly. No idea why.

Saga Musix

OpenMPT currently will try to map the entire file into virtual memory, so that explains why it will not work with the 32-bit version at all (it shouldn't crash though, I will investigate that). Why the soundfont doesn't work properly in the 64-bit version I cannot tell you without a deeper investigation, but in general OpenMPT is not very good at handling soundfonts, so it shouldn't come as a surprise that many SF2/DLS features will not be played properly anyway.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

sc00p

#2
Quote from: Saga Musix on September 15, 2019, 11:12:25
OpenMPT currently will try to map the entire file into virtual memory, so that explains why it will not work with the 32-bit version at all (it shouldn't crash though, I will investigate that). Why the soundfont doesn't work properly in the 64-bit version I cannot tell you without a deeper investigation, but in general OpenMPT is not very good at handling soundfonts, so it shouldn't come as a surprise that many SF2/DLS features will not be played properly anyway.

So what is an alternative? Could a SF2 vst player work?
I mean, the largest .sf2 i have before stgiga's was the Touhou soundfont, which was about 249 MB in size, and it worked perfectly.

Saga Musix

If your focus is on actually using the SF2s the way they were ment to be played, then a VST plugin is your only choice, yes. OpenMPT's instruments work very differently internally compared to SF2/DLS instruments, so playback of those instruments is always just an approximation and should be considered a bonus feature, not a core capability of OpenMPT.

As said, I will look into improving support for this particular soundfont (both making it usable in 32-bit builds and figuring out why most instruments appear to be missing in the 64-bit builds), still the most authentic way of playing the file will be using a dedicated soundfont VST. I'd recommend Sobanth by BeRo for that, as it's a very accurate and up-to-date plugin.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

sc00p

Quote from: Saga Musix on September 15, 2019, 12:53:08
If your focus is on actually using the SF2s the way they were ment to be played, then a VST plugin is your only choice, yes. OpenMPT's instruments work very differently internally compared to SF2/DLS instruments, so playback of those instruments is always just an approximation and should be considered a bonus feature, not a core capability of OpenMPT.

As said, I will look into improving support for this particular soundfont (both making it usable in 32-bit builds and figuring out why most instruments appear to be missing in the 64-bit builds), still the most authentic way of playing the file will be using a dedicated soundfont VST. I'd recommend Sobanth by BeRo for that, as it's a very accurate and up-to-date plugin.

Heck, chrome and firefox says this download is not safe????

Saga Musix

They do because BeRo is also a quite active size-coder and has written a custom executable packer; antivirus snake-oil these days tends to flag many executables using custom compression as "potentially dangerous" (rather than actually analyzing if there is any threat inside), hence his website ended up on Google's malware list. I can vouch for BeRo though that his software is safe to use.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

sc00p

Quote from: Saga Musix on September 15, 2019, 13:00:56
They do because BeRo is also a quite active size-coder and has written a custom executable packer; antivirus snake-oil these days tends to flag many executables using custom compression as "potentially dangerous" (rather than actually analyzing if there is any threat inside), hence his website ended up on Google's malware list. I can vouch for BeRo though that his software is safe to use.
I got the vst installed and tried to import the .sf2. no luck, it doesn't display any instruments.

Saga Musix

I've pointed BeRo at this thread, he should be able to figure out faster what's going on. ;)
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Saga Musix

Okay, I had a closer look at the code. The next OpenMPT version will no longer crash when loading the file in the 32-bit version (but it will still not be able to load the file at all, that will require some more rework), and the 64-bit version will be able to load all those instruments that were previously silent.

BeRo also updated Sobanth and fixed some issues. Note that the 64-bit version will currently not run in OpenMPT as it's not compatible with some of the security hardening measures used by OpenMPT. It can be run in the plugin bridge, though. The 32-bit version works fine, too, but you should of course avoid loading all instruments at once.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

LPChip

An alternative approach you could do is to create multiple smaller SF2 files from this large files. Split it all up so to say. Awave Studio 11 is one of many programs (although paid) that could do this.

Awave has another little neat feature though, if the soundfont is not multi-layered, it can export to .iti files, and you don't even need anything and be ensured that it works. Then again, if its not multi-layered, OpenMPT is likely going to load the SF2 in just fine anyway.

A multilayered SF2 could potentially be exported to multiple .iti files, that when played at the same time shoud reproduce the same sound too. But in that case, it is far easier to use a SF2 player, optionally using Awave to export individual instruments as separate SF2 files.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs