Skip to content

feat: rebase the fork on FluidSynth 2.6.1 (embedded OSAL, 2.6 sound knobs, SF3 level fix) - #19

Merged
enikey87 merged 778 commits into
mainfrom
feature/upstream-2.6
Sep 30, 2026
Merged

enikey87 merged 778 commits into
mainfrom
feature/upstream-2.6

Conversation

@enikey87

@enikey87 enikey87 commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Intent

Move the fork from FluidSynth 2.3.0 to v2.6.1 and replace our GLib-removal patch with upstream's osal=embedded. Wanted from upstream: the 2.5.6 security fixes in code we ship (MIDI player, SF2 parser), the seek/RPN fixes in the player functions midi-player calls, the filter/envelope fixes, and the 2.6 sound knobs (reverb engine, limiter, sinc interpolation) as consumer options.

Review surface: the diff against main is the upstream 2.3.0→2.6.1 delta (356 files). Ours is git diff v2.6.1..HEAD: the emscripten/CI/package files plus 8 files in src/, +76/−9.

One upstream change is deliberately overridden. Since 2.3.7 libsndfile scales every Ogg sample in an SF3 by its own peak (SFC_SET_SCALE_FLOAT_INT_READ, meant to stop loud samples clipping). The scale is 1/peak, so quiet samples are lifted to full scale: on SGM_Plus_HQ.sf3 guitars came out +8 dB and bass +1.4 dB against 2.3.0. The fork scales only samples whose decoded peak exceeds 1.0; levels are then within 0.4 dB of 2.3.0. Not proposed upstream, by decision.

Left out on purpose: the SMF routing table (#16), per-track outputs on stock routing (#17), per-track drums (#18). The per-track-audio patch is ported as-is and goes away in #17.

Tested as 1.0.0-beta.1..3 under dist-tag next (A/B stand fluidsynth-26.songsterr.dev runs beta.3). Merging publishes 0.0.4 as latest: still an unstable 0.0.x release, not 1.0.

What Changed

  • Tree is upstream v2.6.1 with osal=embedded; emscripten CMake glue, build.sh, Dockerfile and .builderr.yml ported (CMake ≥ 3.24 via pip, gcem + signalsmith-audio-basics submodules, -Denable-network=off for the native check, C++17 because embedded OSAL uses std::clamp).
  • emscripten/exports.txt regenerated from the 2.6.1 headers (378 symbols) by make-exports.cjs; per-track audio routing re-applied.
  • fluid_sffile.c: conditional Ogg scaling. test/wasm/smoke.mjs gains knobs (each 2.6 knob changes the render) and level (quiet and over-full-scale Ogg samples match their PCM twins within 0.5 dB; fixtures from test/wasm/fixtures/make-level-fixture.py).

Decisions and Tradeoffs

  • Final commit is a -s ours merge of main: records it as an ancestor so the PR merges without conflicts, takes nothing from it. Rebasing onto a 2.3.0-based main is meaningless, and a conflicting PR runs no CI.
  • FLUID_INTERP_7THORDER (7) is now upstream's 25th-order sinc, too slow for realtime; consumers use 5 or 6.
  • wasm 289 → 464 KB (sf3 1.75 → 1.91 MB): limiter and reverb engines.

🤖 Generated with Claude Code

derselbst and others added 30 commits November 8, 2025 10:53
…port

Add iOS support to coreaudio driver
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…dSynth#1732)

Bumps the github-actions group with 3 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [actions/upload-artifact](https://github.com/actions/upload-artifact) and [actions/download-artifact](https://github.com/actions/download-artifact).


Updates `actions/checkout` from 5 to 6
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v5...v6)

Updates `actions/upload-artifact` from 5 to 6
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v5...v6)

Updates `actions/download-artifact` from 6 to 7
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/download-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Fix a heap-based use after free during synth destruction
* Prevent deletion of DLS font while being in use
* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
IPv4 is used as a fallback since ca65e6f

Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
Bumps the github-actions group with 1 update: [vmactions/solaris-vm](https://github.com/vmactions/solaris-vm).


Updates `vmactions/solaris-vm` from 1.1.5 to 1.2.3
- [Release notes](https://github.com/vmactions/solaris-vm/releases)
- [Commits](vmactions/solaris-vm@v1.1.5...v1.2.3)

---
updated-dependencies:
- dependency-name: vmactions/solaris-vm
  dependency-version: 1.2.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
derselbst and others added 27 commits August 30, 2026 19:10
Like the jack driver, pipewire supports setting a device name. Introduce a new settings entry named audio.pipewire.id, which sets the pipewire node name property.

Co-authored-by: Tom M. <tom.mbrt@googlemail.com>
Previously, enum values were rendered as markdown tables in the API docs.  While looks quite good, it wastes page space and it's impossible to use other markdown constructs like admonitions in a table cell.

Therefore, this PR makes enum values render as sub-sections with text. It also fixes doxygen commands not rendering correctly for enum values.
cmake is a meta package, cmake-core is cmake itself
git-lite has fewer dependencies and is enough for workflow
Same change as 1c47634/25924c80 on the 2.3.0 base: with
synth.per-track-audio each ten-channel SMF track gets its own audio group,
synth.midi-channels defaults to 256, and test_per_track_audio covers it.
The manual render targets in test/ now require the fluidsynth CLI target,
which the emscripten build does not produce.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The fork's own NO_GLIB OS layer is gone: upstream's osal=embedded takes its
place, so only the emscripten link flags, exports.txt, the JS-executable
target and the sf3 static link survive from the 2.3.0 CMake patch. C++17 is
forced under emscripten because upstream's embedded OSAL compiles
std::clamp under C++11, and doc/ is skipped because its demos cannot link a
JS executable. Artifacts are named libfluidsynth-2.6.1.*; version
1.0.0-beta.1.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2.6.1 discovers libsndfile through find_library, which the emscripten
toolchain confines to its sysroot, so the static libsndfile-emscripten
next to the checkout was never found; CMAKE_FIND_ROOT_PATH_MODE_* is BOTH
in that mode. FindSndFileLegacy cannot run its vorbis probe while
cross-compiling, so LIBSNDFILE_HASVORBIS is set explicitly there, and
FindOpus no longer aborts on the non-numeric Version: that opus.pc carries.
The manual render targets in test/ require the fluidsynth CLI target.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The emsdk image's CMake 3.16 cannot download gcem, so build.sh and the CI
check step initialise the two submodules the build needs (test/manual is
120 MB of test data and stays out). signalsmith-audio-basics also turns on
the 2.6 limiter and reverb engines, which the earlier local builds lacked.
The check step now writes the ctest verdict to check.md: the builderr CLI
truncates long logs, which hid which of 44 tests failed in CI.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…user

builderr's clone container creates /home/builderr under a different uid
than the step containers, so git refused it as an unsafe repository and
both the check and wasm steps died at the submodule update.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… accepts

The emsdk image ships git 2.25, which ignores safe.directory given via -c
and does not know the '*' wildcard; only explicit paths in the global
config work there.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
signalsmith-audio-basics requires CMake 3.24; the emsdk 3.1.10 image ships
3.16, so the wasm CI step and the Dockerfile add a pip-installed CMake.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The CLI truncates step logs, and dpkg's progress lines alone exceed the cap,
hiding the part that matters.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…esent

A docker compose run from a git worktree cannot reach the worktree's
repository, and a tree that already carries gcem and signalsmith needs no
git at all.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Inside the step container nproc is the node's core count, and the check
step dies silently right after configure; feed the build a fixed -j4 and
reserve 4 GB.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Under set -e, `make …; s=$?` exits the shell on a red make before the
report is written, which is why the step died without a line of output.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…l test

dash in debian:bookworm-slim has no pipefail, so `make | tee || s=$?`
reported a failing make as success. The one test that fails in the CI
container, test_shell_server_auto_port, needs to bind a TCP port; the
native check exists for the engine, and the wasm build has no network.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ke the 2.6 knobs

make-exports is a CommonJS script, so it moves to .cjs now that package.json
declares "type": "module", and it keeps _malloc/_free, which consumers call.
The list gains the 2.6 API (player division, mod transforms, portamento
time mode, s24/s32 rendering, voice callback). The smoke test now proves
the three settings consumers are about to turn — synth.reverb.engine,
synth.limiter.active and FLUID_INTERP_MID — each change the rendered audio.
Version 1.0.0-beta.2.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Upstream 2.3.7 turned on libsndfile's SFC_SET_SCALE_FLOAT_INT_READ for every Ogg
sample to stop loud ones from clipping. The scale is 1/peak, so it also lifts each
quieter sample to full scale: on SGM_Plus_HQ.sf3 guitars came out 8 dB louder than
on 2.3.0 and the bass 1.4 dB, changing the mix. Scale only when the decoded peak
exceeds 1.0. The smoke test compares a quiet and an over-full-scale Ogg sample with
their PCM twins.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The branch re-bases the fork on FluidSynth v2.6.1 and re-applies the fork's
build, CI and package files on top; main's 2.3.0-era history is recorded as an
ancestor so the PR merges without conflicts, but none of its content is taken.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The rebase on v2.6.1 brought upstream's CI back; main removed it in dbb4d5f
because builderr is the fork's CI and these pipelines cannot pass here (no
upstream secrets, no Solaris/FreeBSD runners we own). They started ten jobs on
the first PR.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@enikey87

Copy link
Copy Markdown
Collaborator Author

AMEN!

Still 0.0.x: the 2.6.1 port ships as an unstable pre-1.0 release. Merging
publishes 0.0.4 as latest; the 1.0.0-beta.N versions stay under next.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@enikey87
enikey87 merged commit 595faae into main Sep 30, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.