Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatpak: Please include the free OPL3 MIDI SoundFont in "/app/share/sounds/sf2" #8896

Closed
mrjpaxton opened this issue Mar 27, 2021 · 2 comments

Comments

@mrjpaxton
Copy link

mrjpaxton commented Mar 27, 2021

Hi, everyone,

I was hoping that the Flatpak version of OpenTTD could use this OPL3 sound font - https://github.com/Mindwerks/opl3-soundfont

The package name in Debian is opl3-soundfont. And it is released under a CC-BY-SA 4.0 license.

My reasoning is that it sounds a lot better than the standard FluidSynth GM and GS SoundFonts that come with it. There are volume mixing issues with some instruments when using it. And in general, certain parts of the songs when played with the Jukebox sound terrible with the FluidSynth backend, and are often too loud.

I understand that OpenTTD heavily relies on Timidity+Freepats instead, but I thought a good alternative would be great.

I have also looked at these threads below, so I will reference them:

When I use flatpak run org.openttd.OpenTTD -m fluidsynth:soundfont=/app/share/sounds/sf2/FluidR3_GM.sf2, it works just fine.

However, when I try to run flatpak run org.openttd.OpenTTD -m fluidsynth:soundfont=/usr/share/sounds/sf2/OPL-3_FM_128M.sf2 it returns this error:

fluidsynth: error: fluid_sfloader_load(): Failed to open '/usr/share/sounds/sf2/OPL-3_FM_128M.sf2': File does not exist.
fluidsynth: error: Unable to open file '/usr/share/sounds/sf2/OPL-3_FM_128M.sf2'
fluidsynth: error: Failed to load SoundFont "/usr/share/sounds/sf2/OPL-3_FM_128M.sf2"
Error: Unable to load driver 'fluidsynth'. The error was: Could not open sound font

Even when specifying --filesystem=host or --filesystem=/usr/share/sounds/sf2/, it will still return the exact same error. So for some reason, it won't load.

I even did some research to find out that the mysterious /app/share/ directory actually points to /var/lib/flatpak/app/org.openttd.OpenTTD/x86_64/stable/<HASH>/files/share/, where appears to be some sort of checksum, likely SHA-256.

Anyway, when I copied over the /usr/share/sounds/sf2/OPL-3_FM_128M.sf2 (OPL-3 SoundFont) file to that /var/lib/flatpak/<...>/share/sounds/sf2/ directory, it still refused to load it at all.

If there is any way anybody knows how to make that work, or can provide a fix for OpenTTD, please let me know!

Version of OpenTTD

OpenTTD 1.10.3 (Flatpak stable repo)

@TrueBrain
Copy link
Member

As we do not maintain the flatpak version of OpenTTD, it might be best to ask your question here:

https://github.com/flathub/org.openttd.OpenTTD

Possible he can help you out setting this up; we know far too little about flatpak to be of any real assistance. Sorry.

@ghisvail
Copy link
Contributor

Follow-up here: flathub/org.openttd.OpenTTD#39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants