I've got a hard time getting software synthesizers to work with the HiFiBerry Digi+ HAT. I've tried to configure both TiMidity++ 2.13.2-40.2 and FluidSynth version 1.1.6 as an ALSA sequencer client on RetroPie 4.0 (running Raspbian with Linux 4.4.26-v7+ kernel).
Without the HAT installed, it runs flawlessly. However, after installing and configuring it as instructed by HiFiBerry, I get this error:
pi@retropie:~ $ fluidsynth -a alsa -m alsa_seq -l -i /usr/share/sounds/sf2/FluidR3_GM.sf2 /home/pi/RetroPie/bj.mid
FluidSynth version 1.1.6
Copyright (C) 2000-2012 Peter Hanappe and others.
Distributed under the LGPL license.
SoundFont(R) is a registered trademark of E-mu Systems, Inc.
fluidsynth: warning: Failed to pin the sample data to RAM; swapping is possible.
fluidsynth: error: The "default" audio device is used by another application
Failed to create the audio driver
My asound config looks like this:
type hw card 0
type hw card 0
Listing the devices results in:
pi@retropie:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_digi], device 0: HifiBerry Digi HiFi wm8804-spdif-0 
Subdevice #0: subdevice #0
pi@retropie:~ $ aplaymidi -l
Port Client name Port name
14:0 Midi Through Midi Through Port-0
Apparently the default audio device is set exclusively to one application. How can I make them play well together? Is a more advanced asound.cfg able to solve my issue?
I know HiFiBerry isn't the developer of TiMidity or FluidSynth, but if anyone on your team has experience with one of these softsynths in combination with your product, it would mean the world to me if you would assist me on this matter.