Skip to content

Instantly share code, notes, and snippets.

@brccabral
Last active August 9, 2026 23:59
Show Gist options
  • Select an option

  • Save brccabral/265ce14de5cc4de6a74a83594ff5cf38 to your computer and use it in GitHub Desktop.

Select an option

Save brccabral/265ce14de5cc4de6a74a83594ff5cf38 to your computer and use it in GitHub Desktop.
MIDI sounds with FluidSynth and PulseAudio

MIDI sounds with FluidSynth and PulseAudio

Install FluidSynth to work as a virtual device capable of playing MIDI sounds. Install a default SoundFont (instrument).

sudo apt install fluidsynth fluid-soundfont-gm

Install "PulseAudio Volume Control" to Mute/Unmute and control volume gain.

sudo apt install pavucontrol

Start FluidSynth with a soundfont. Leave the terminal opened.

fluidsynth -a pulseaudio -m alsa_seq \
    /usr/share/sounds/sf2/FluidR3_GM.sf2

Open "PulseAudio Volume Control" to check FluidSynth volume.
Open "qpwgraph" to see connections in a Graph (if pavucontrol is opened it will show PulseAudio Control connections too).

sudo apt install qpwgraph

In FluidSynth console:

noteon 0 60 127
noteoff 0 60 127
fonts
settings
set synth.gain 1.0
select <channel> <soundfont_id> <bank> <instrument_program>
help all
quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment