Author Topic: Can't load a 3,9gb sf2 into OpenMPT.  (Read 316 times)

Offline sc00p

  • Shy artist
  • Posts: 4
  • Operating System: Windows 10
Can't load a 3,9gb sf2 into OpenMPT.
« 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.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,772
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: Can't load a 3,9gb sf2 into OpenMPT.
« Reply #1 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.
» 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.

Offline sc00p

  • Shy artist
  • Posts: 4
  • Operating System: Windows 10
Re: Can't load a 3,9gb sf2 into OpenMPT.
« Reply #2 on: September 15, 2019, 11:19:20 »
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.
« Last Edit: September 15, 2019, 11:35:04 by sc00p »

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,772
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: Can't load a 3,9gb sf2 into OpenMPT.
« Reply #3 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.
» 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.

Offline sc00p

  • Shy artist
  • Posts: 4
  • Operating System: Windows 10
Re: Can't load a 3,9gb sf2 into OpenMPT.
« Reply #4 on: September 15, 2019, 12:57:29 »
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????

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,772
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: Can't load a 3,9gb sf2 into OpenMPT.
« Reply #5 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.
» 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.

Offline sc00p

  • Shy artist
  • Posts: 4
  • Operating System: Windows 10
Re: Can't load a 3,9gb sf2 into OpenMPT.
« Reply #6 on: September 15, 2019, 13:06:22 »
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.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,772
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: Can't load a 3,9gb sf2 into OpenMPT.
« Reply #7 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. ;)
» 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.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,772
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: Can't load a 3,9gb sf2 into OpenMPT.
« Reply #8 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.
» 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.

Offline LPChip

  • Administrator
  • *****
  • Posts: 5,076
    • http://lpchip.nl
  • Operating System: Windows 10 Pro x64
Re: Can't load a 3,9gb sf2 into OpenMPT.
« Reply #9 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.
"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