ModPlug Central

OpenMPT => Help and Questions => Topic started by: sc00p on September 15, 2019, 10:45:18

Title: Can't load a 3,9gb sf2 into OpenMPT.
Post by: sc00p on September 15, 2019, 10:45:18
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.
Title: Re: Can't load a 3,9gb sf2 into OpenMPT.
Post by: 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.
Title: Re: Can't load a 3,9gb sf2 into OpenMPT.
Post by: sc00p on September 15, 2019, 11:19:20
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.
Title: Re: Can't load a 3,9gb sf2 into OpenMPT.
Post by: 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 (https://blog.rosseaux.net/page/e5ca75d98990e33b31dadc78a8df1333/Sobanth) by BeRo for that, as it's a very accurate and up-to-date plugin.
Title: Re: Can't load a 3,9gb sf2 into OpenMPT.
Post by: sc00p on September 15, 2019, 12:57:29
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 (https://blog.rosseaux.net/page/e5ca75d98990e33b31dadc78a8df1333/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????
Title: Re: Can't load a 3,9gb sf2 into OpenMPT.
Post by: 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.
Title: Re: Can't load a 3,9gb sf2 into OpenMPT.
Post by: sc00p on September 15, 2019, 13:06:22
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.
Title: Re: Can't load a 3,9gb sf2 into OpenMPT.
Post by: Saga Musix on September 15, 2019, 13:11:04
I've pointed BeRo at this thread, he should be able to figure out faster what's going on. ;)
Title: Re: Can't load a 3,9gb sf2 into OpenMPT.
Post by: Saga Musix on September 15, 2019, 20:02:24
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.
Title: Re: Can't load a 3,9gb sf2 into OpenMPT.
Post by: LPChip on September 16, 2019, 20:35:23
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.