Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

204.1. fluidsynth-2.6.1

SoundFont MIDI synthesiser

2.6.1-2 · LGPL-2.1-or-later · 1.1 SBU · 1.2 MiB, 29 files · 42_graphics, 98 of 189 · ports/core/music-libs/fluidsynth

Homepage: https://www.fluidsynth.org/

Why it is in KDOS. The comment above it in script/phases/42_graphics/packages.d/music-libs.txt:

A MIDI file is a SCORE, not a recording — a few kilobytes of "which note, how hard, when", worthless without a synthesiser.

FluidSynth is a software synthesiser that plays MIDI with SoundFont instruments: the fluidsynth program and libfluidsynth, which SDL_mixer, the Doom engines and other programs use for their MIDI music. The SoundFont comes from fluidr3-gm-sf3, which installs /usr/share/soundfonts/default.sf2, a link to its SF3 SoundFont, at the path FluidSynth compiles in as its default (DEFAULT_SOUNDFONT in cmake_admin/DefaultDirs.cmake), so fluidsynth -a alsa tune.mid plays with no SoundFont named.

Depends on: cmake, ninja, pkgconf, gcc, alsa-lib, pipewire, libsndfile, readline, dbus, ladspa, fluidr3-gm-sf3.

Required by (15): audacious-plugins, chocolate-doom, crispy-doom, dosbox-staging, dosbox-x, dsda-doom, gst-plugins-bad, lmms, minuet, mpd, openttd, scummvm, sdl2-mixer, sdl3-mixer, vlc.

Sources: fluidsynth-2.6.1.tar.gz (2.2 MiB), gcem-012ae73c6d0a2cb09ffe86475f5c6fba3926e200.tar.gz (56.5 KiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/42_graphics/phase.env && kpkg install fluidsynth'

build.sh:

mkdir -p gcem
tar xf "$PORT_SRC/gcem-$_gcem.tar.gz" --strip-components=1 -C gcem

mkdir -p build && cd build
cmake .. -G Ninja \
	-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_INSTALL_LIBDIR=lib \
	-Denable-alsa=ON \
	-Denable-pipewire=ON \
	-Denable-pulseaudio=OFF \
	-Denable-jack=ON \
	-Denable-sdl3=OFF \
	-Denable-oss=OFF \
	-Denable-readline=ON \
	-Denable-libsndfile=ON \
	-Denable-dbus=ON \
	-Denable-openmp=ON \
	-Denable-signalsmith=OFF \
	-Denable-systemd=OFF \
	-Denable-ladspa=ON \
	-Denable-midishare=OFF
grep -q '^#define JACK_SUPPORT 1' config.h
grep -q '^#define LADSPA 1' config.h
ninja
DESTDIR=$PKG ninja install

Programs: fluidsynth.

Libraries: libfluidsynth.so.

Directories: /usr/include/fluidsynth, /usr/lib/cmake/fluidsynth, /usr/share/licenses/fluidsynth.

Upstream’s enable-* switches mean “if it is available”, so each probe is named on, with its port in depends, or off. The two grep -q lines after configure check config.h for JACK and LADSPA, so a probe that came back empty stops the build instead of shipping without them.

gcem, the header-only compile-time maths library FluidSynth requires, is a git submodule upstream, and the release archive leaves its gcem/ directory empty. cmake_admin/FindGCEM.cmake looks for gcem/include/gcem.hpp in the source tree and downloads the archive from GitHub at configure time only when it is missing, and the build has no network. The pinned revision is therefore the recipe’s second source =, unpacked by build.sh into gcem/ where the probe looks. Nothing is compiled or installed from it.