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
-Denable-alsa=ON,-Denable-pipewire=ON— ALSA and native PipeWire audio drivers. The desktop session runs PipeWire while a text console has only ALSA, so both are built.-Denable-pulseaudio=OFF— Builds no PulseAudio driver; in the session, the PipeWire driver reaches the same graph directly.-Denable-jack=ON— The JACK audio and MIDI drivers, against PipeWire’slibjack. There is no JACK server, and oncejack.pcis installed a port that leaves JACK on auto-detection gains it or not by build order, so it is named, with pipewire independs(see JACK programs on the host).-Denable-sdl3=OFF,-Denable-oss=OFF— Builds neither the SDL 3 audio driver nor the OSS one.-Denable-readline=ON— Line editing in thefluidsynthshell, through readline.-Denable-libsndfile=ON— Through libsndfile: rendering to an audio file, and decoding the Ogg Vorbis samples of an SF3 SoundFont. Without it FluidSynth refuses a version 3 SoundFont, which is what fluidr3-gm-sf3 installs.-Denable-dbus=ON— D-Bus, through which FluidSynth asks rtkit for a realtime audio thread.-Denable-openmp=ON— OpenMP, from GCC’s libgomp: a SoundFont’s samples are decoded in parallel as it loads, the effects units run in parallel, and the voice-mixing loops are vectorised.-Denable-ladspa=ON— LADSPA effect units in the audio path, against ladspa.-Denable-signalsmith=OFF— Builds without the Signalsmith reverb and limiter. Their source is a git submodule,signalsmith-audio-basics/, which the release archive leaves empty.-Denable-systemd=OFF— Builds without libsystemd, which thefluidsynthprogram would link only to report readiness to a systemd service manager withsd_notify(). KDOS has no systemd (see No systemd).-Denable-midishare=OFF— Builds no MidiShare driver; MidiShare is not a port.
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.