FluidSynth is a real-time software synthesizer based on the SoundFont 2 specifications. It is optionally used by gst-plugins-bad.
The first step is to install the fluidsynth package.
There are two ways to use FluidSynth. Either as MIDI player or as daemon adding MIDI support to ALSA.
assuming than you installed soundfont-fluid.
There are many other options to fluidsynth; see manpage or use -h to get help.
One may wish to use pulseaudio instead of alsa as the argument to the -a option.
Tip: The soundfont does not needed to be specified every time if a symbolic link created for the default soundfont, e.g.
After that, you can start/enable the fluidsynth service. Note that you can't use root to restart the fluidsynth service, if you're using the pulseaudio driver. Pulseaudio won't allow root to connect, since the pulseaudio server is usually started by the user (and not root). You can solve it by creating a systemd/User service (replacing multi-user.target with default.target in the copied fluidsynth.service).
Requires soundfont-fluid or any other soundfont of your choice.
fluidsynth -nli -r 48000 -o synth.cpu-cores=$maxjobs -F "/dev/shm/$name.raw" /usr/share/soundfonts/FluidR3_GM.sf2 "$@"
oggenc -r -B 16 -C 2 -R 48000 "/dev/shm/$name.raw" -o "$name.ogg"