Linux: Soundfonts default to AdLib emulation

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
QuesterLEJ
Posts: 2
Joined: Fri Mar 29, 2019 3:40 am

Linux: Soundfonts default to AdLib emulation

Post by QuesterLEJ »

Hello,

Longtime user of ScummVM on Windows here who is contemplating a switch to Linux. As the subject field indicates, I'm trying to configure a SoundFont to improve music quality over my computer's integrated audio, but SCUMMVM defaults to the default AdLib emulation even when I have FluidSynth installed and running and a SoundFont selected.

One clue: Here are the messages displayed while FluidSynth starts up and tries to load the SoundFont.

Code: Select all

11:22:19.991 Qsynth1: Creating synthesizer engine...
11:22:20.593 Qsynth1: Loading soundfont: "/home/luke/HDD/soundfonts/UHD3.sf2" (bank offset 0)...
11:22:20.981 Qsynth1: Creating audio driver (pulseaudio)...
11:22:20.984 Qsynth1: Creating MIDI router (alsa_seq)...
11:22:20.984 Qsynth1: Creating MIDI driver (alsa_seq)...
11:22:20.986 Qsynth1: Creating MIDI player...
11:22:20.986 Qsynth1: fluid_synth_set_reverb_on(1)
11:22:20.986 Qsynth1: fluid_synth_set_chorus_on(1)
11:22:20.987 Qsynth1: Synthesizer engine started.
11:22:20.987 Qsynth1: fluid_synth_set_gain(1)
11:22:20.987 Qsynth1: fluid_synth_set_reverb(0.2,0,1,0.9)
11:22:20.987 Qsynth1: fluid_synth_set_chorus(3,1,0.3,8,0)
fluidsynth: warning: SDL2 not initialized, SDL2 audio driver won't be usable
fluidsynth: error: Unknown integer parameter 'synth.dump'
fluidsynth: Using PulseAudio driver
fluidsynth: warning: Failed to set thread to high priority
fluidsynth: warning: Instrument not found on channel 9 [bank=128 prog=9], substituted [bank=128 prog=0]
fluidsynth: warning: Instrument not found on channel 9 [bank=128 prog=9], substituted [bank=128 prog=0]
fluidsynth: warning: Instrument not found on channel 9 [bank=128 prog=9], substituted [bank=128 prog=0]
fluidsynth: warning: Instrument not found on channel 9 [bank=128 prog=9], substituted [bank=128 prog=0]
fluidsynth: warning: Failed to set thread to high priority
11:25:37.198 Qsynth1: fluid_synth_set_chorus(3,1,0.3,8,1)
I'm guessing those failures have everything to do with why the SoundFont isn't used. I'd appreciate some suggestions and assistance.

Luke

User avatar
eriktorbjorn
ScummVM Developer
Posts: 3334
Joined: Mon Oct 31, 2005 7:39 am

Re: Linux: Soundfonts default to AdLib emulation

Post by eriktorbjorn »

QuesterLEJ wrote:
Wed Jun 24, 2020 4:57 pm
Longtime user of ScummVM on Windows here who is contemplating a switch to Linux. As the subject field indicates, I'm trying to configure a SoundFont to improve music quality over my computer's integrated audio, but SCUMMVM defaults to the default AdLib emulation even when I have FluidSynth installed and running and a SoundFont selected.
If I understand you correctly, you have to tell ScummVM which music device to use, either under Options (to change the default settings) or Edit Game for the specific game.

Note that if you select "FluidSynth", ScummVM uses the FluidSynth library to play MIDI, and you have to set a SoundFont in the ScummVM MIDI settings. That works well enough for me that I haven't tried finding any better alternatives.

If you've set up FluidSynth to handle MIDI outside of ScummVM, I guess "Midi Through [ALSA]" might work. It's been years since I tried that, and I seem to remember having issues with it. But maybe it works better now?

QuesterLEJ
Posts: 2
Joined: Fri Mar 29, 2019 3:40 am

Re: Linux: Soundfonts default to AdLib emulation

Post by QuesterLEJ »

I've done that--selecting FluidSynth as the MIDI device and pointing it to the SoundFont.

The error I mentioned seems to suggest a configuration problem with FluidSynth itself, so I'll try asking the team there. Just thought someone here may have had the same issue so I decided to ask here first.

User avatar
eriktorbjorn
ScummVM Developer
Posts: 3334
Joined: Mon Oct 31, 2005 7:39 am

Re: Linux: Soundfonts default to AdLib emulation

Post by eriktorbjorn »

QuesterLEJ wrote:
Fri Jun 26, 2020 2:01 am
I've done that--selecting FluidSynth as the MIDI device and pointing it to the SoundFont.

The error I mentioned seems to suggest a configuration problem with FluidSynth itself, so I'll try asking the team there. Just thought someone here may have had the same issue so I decided to ask here first.
Ah, I thought maybe you hadn't because the log you posted didn't look like anything ScummVM would print. The ScummVM FluidSynth music device uses libfluidsynth to generate audio to a buffer (i.e. it's not dependent on any external fluidsynth process running in the background), which it then plays like any other digital audio. I haven't heard of that failing before. There are some things that can go wrong during initialization, but they should cause ScummVM to terminate, not cause it to fall back to another music driver... I think...

Of course, there are games that do not have any MIDI music at all. If you're playing any of those then you might get AdLib emulation instead, I guess.

_Rob
Posts: 2
Joined: Mon Jun 29, 2020 6:36 am

Re: Linux: Soundfonts default to AdLib emulation

Post by _Rob »

Not related to the synth.dump error..

But the errors below it seem to indicate that the soundfont your trying to use is missing instruments. It is probably not (fully) General MIDI (GM) compatible.

Try using a soundfont such as FluidR3_GM.sf2 it is included in most Linux distributions, and typically installed as /usr/share/soundfonts/default.sf2 or /usr/share/sounds/sf2/FluidR3_GM.sf2

e.g. on Fedora

Code: Select all

sudo dnf install fluid-soundfont-gm
If you want a version that combines both GM and GS in a single soundfont, try this one:
https://musical-artifacts.com/artifacts/1229

Post Reply