FluidSynth as a background service
From Pengwings
Required if you need MIDI support in any of your Wine/Proton software
Install FluidSynth
sudo rpm-ostree install fluidsynth
If you have vlc layered you should also install vlc fluidsynth plugin to play midis in vlc
sudo rpm-ostree install vlc-plugin-fluidsynth
Now reboot
systemctl reboot
Download gm.sf2 from here https://musical-artifacts.com/artifacts/713 and put it somewhere e.g. /opt/soundfonts/
Edit fluidsynth configuration:
sudo vim /etc/sysconfig/fluidsynth
# Mandatory parameters (uncomment and edit) SOUND_FONT=/opt/soundfonts/gm.sf2 # Additional optional parameters (may be useful, see 'man fluidsynth' for further info) OTHER_OPTS='-a pipewire -r 48000 -z 512'
Enable fluidsynth user service and verify status:
systemctl enable --now --user fluidsynth.service systemctl --user status fluidsynth.service
Do not use alsa or pulseaudio outputs with fluidsynth because they don't work properly and cause the MIDI player to randomly break.
You should also make sure that you definitely set frequency (-r 48000) and audio buffer size (-z 512) to avoid audio cracking/distortion issue.