OPL3 rendering path: authentic Sound Blaster FM, no soundfont

- tools/opl/render_opl.cpp: libADLMIDI harness - renders MIDI through
  OPL3 emulation with game-driver volume models (DMX/Doom, Apogee/Duke,
  AIL, HMI), normalised output, WAV header patched to actual length
- tools/opl/build.sh: one-shot fetch+build of libADLMIDI
- tools/render_opl.sh: batch render + check_wav for all tunes
- README: OPL3 section
This commit is contained in:
Hermes Agent committed 2026-10-17 07:23:55 +00:00
1 parent 9b1e61b2ce
commit 72a337f50f
5 files changed
+152

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
# build.sh — fetch and build libADLMIDI, then compile render_opl.
# Idempotent: skips anything already present. Run once per machine.
set -euo pipefail
cd "$(dirname "$0")"
LIBDIR="${OPL_LIBDIR:-/opt/libADLMIDI}"
if [ ! -f "$LIBDIR/build/libADLMIDI.a" ]; then
echo "cloning libADLMIDI..."
git clone --depth 1 -q https://github.com/Wohlstand/libADLMIDI.git "$LIBDIR"
echo "building (a few minutes)..."
cmake -B "$LIBDIR/build" -S "$LIBDIR" -DCMAKE_BUILD_TYPE=Release >/dev/null
cmake --build "$LIBDIR/build" -j"$(nproc)" --target ADLMIDI_static >/dev/null
fi
g++ -O2 -I "$LIBDIR/include" render_opl.cpp "$LIBDIR/build/libADLMIDI.a" \
-o render_opl -lpthread
echo "built: $(pwd)/render_opl"