Paths to added soundfont files is saved as relative in config file

Please let our ADS show!

This sites offers only FREE software and it's supported by a few advertisement boxes (no intrusive popups).
Please:

  • disable your AdBlocker by adding CoolSoft website to whitelist
  • give the proper cookie consent
  • enable JavaScript for this website

This seconds wait is to let you update your browser configuration...

Ok, I've done the required changes... now show me your content!
!!! Please enable JavaScript !!!
Posts: 9
Joined: April 28, 2020 - 12:12
Paths to added soundfont files is saved as relative in config file

I imported a .vmssf file with a bunch of soundfonts that are located in the same directory.

[SoundFonts]
sf1=Piano 1.sfz
sf1.enabled=1
sf1.preset=0
sf1.bank=0
sf2=Piano 2.sfz
sf2.enabled=1
sf2.preset=1
sf2.bank=0
sf3=Piano 3.sfz
sf3.enabled=1
sf3.preset=2
sf3.bank=0

When imported in the configurator using the import button, the soundfonts are properly imported and everything works.

The problem is if I restart the software or reboot, WMS cannot find the soundfont files anymore.

I noticed the soundfont files are stored in the VirtualMIDISynth.conf configuration file using the relative path from the vmssf file instead of using the real absolute path of the soundfont.

[SoundFonts]
sf1=Piano 1.sfz
sf1.enabled=1
sf1.preset=0
sf1.bank=0
sf2=Piano 2.sfz
sf2.enabled=1
sf2.preset=1
sf2.bank=0
sf3=Piano 3.sfz
sf3.enabled=1
sf3.preset=2
sf3.bank=0

instead of

[SoundFonts]
sf1=C:\Users\me\sfz\Piano 1.sfz
sf1.enabled=1
sf1.preset=0
sf1.bank=0
sf2=C:\Users\me\sfz\Piano 2.sfz
sf2.enabled=1
sf2.preset=1
sf2.bank=0
sf3=C:\Users\me\sfz\Piano 3.sfz
sf3.enabled=1
sf3.preset=2
sf3.bank=0

Saving them in the config using their real path would solve this issue that can be very annoying, especially when you have 128 error poupups that appear every 3s :)

Posts: 1972
Joined: March 25, 2012 - 01:19
Re: Paths to added soundfont files is saved as relative in config file
LenweSaralonde wrote:
I noticed the soundfont files are stored in the VirtualMIDISynth.conf configuration file using the relative path from the vmssf file

No, it's not (and I agree it shouldn't).

Exported file contains the filenames format as shown in the soundfonts list, which must be (and it's supposed to be) an absolute path.
Maybe it all started after importing the wrongly saved .vmssf file at first.
Should be great to know how did you came into that condition...

Could you try to add/remove SF2 files from the list and check that each one is shown with its full path?
(do not load an already wrong .vmssf file, because there's actually no check on file paths)

Posts: 9
Joined: April 28, 2020 - 12:12
Re: Paths to added soundfont files is saved as relative in config file

My .vmssf file has been generated by hand with relative paths because it's intended to be bundled within a pack of .sfz files so we can't predict the full path of the folder the end user will save them.

  • Soundfont files added by the .vmssf file with relative paths show as relative
  • When adding a soundfont file by drag and drop or using the + button, the full absolute path is shown
  • Relative and absolute paths described above are reflected in the VirtualMIDISynth.conf file and the exported  .vmssf file

IMO it would make sense to me to allow relative paths in .vmssf (so they can be distributed in packs) and convert them into absolute path during the import process.

Attachments (Only registered users)
Screenshot from 2020-05-04 16-26-16.png
Posts: 1972
Joined: March 25, 2012 - 01:19
Re: Paths to added soundfont files is saved as relative in config file

Ok, now I understand.
I thought this was a bug report (since you've posted it in Bug reports section), but this is much more a feature request, so I'll move it to the Wishlist section.

Now, I could try to "fix" paths relative --> absolute (if they're not) on import, but export will always contain absolute paths...

Can you confirm that this is what you're asking for?

Posts: 9
Joined: April 28, 2020 - 12:12
Re: Paths to added soundfont files is saved as relative in config file
coolsoft wrote:

Now, I could try to "fix" paths relative --> absolute (if they're not) on import, but export will always contain absolute paths...

Can you confirm that this is what you're asking for?

Yes

Posts: 9
Joined: April 28, 2020 - 12:12
Re: Paths to added soundfont files is saved as relative in config file

Hi

Will this feature be implemented soon ? I don't see it in the TODO list.

This feature would be helpful for my project. I have a dirty workaround for now (generating a .bat file that generates the config file with absolute paths) but allowing to rewrite relative paths to absolute during import would be much more cleaner.

Posts: 1972
Joined: March 25, 2012 - 01:19
Re: Paths to added soundfont files is saved as relative in config file

I'm really sorry, I've somehow missed this thread.
Or rather, I thought I've already posted a version with this feature... 🙄.

Looking back to my source repository log I've found that... it was never included, so I dit it now 😉.

Version 2.10.2 is now available and includes this new feature.
Please check it out and report your thoughts.

Posts: 9
Joined: April 28, 2020 - 12:12
Re: Paths to added soundfont files is saved as relative in config file

It works great now, thanks a lot !