This is a separate fork of skjelten/emusc focused on library development, reverse engineering exploration, and AI-assisted analysis of Roland Sound Canvas emulation. This is not the main upstream EmuSC project. This fork diverges significantly and will remain independent.
Written by an AI. No guarantee.
Most of the code, documentation, and reverse-engineering analysis in this fork was generated by Claude, with human review and supervision. Expect some level of hallucination: a language model produces confident, plausible, wrong statements as readily as correct ones, and the claims here about ROM structure, envelope behavior, and oscillator characteristics rest on analysis nobody outside this project has independently verified. Measurements quoted as fact may be measuring the wrong thing.
Use it knowing that. It is a hobby project, part of a personal exploration of LLMs' capabilities in reverse engineering. It is offered as-is, with no warranty, no fitness for any purpose, and no support of any kind. Verify anything you intend to rely on, especially before using it as a reference for other work.
emuscd (the library libEmuSC + headless tools) emulates the low-level synthesis behavior of Roland's Sound Canvas family of synthesizers. It extracts and reimplements ROM-based voice engines, including oscillator waveforms, TVA (Time Variant Amplifier) envelopes, effects processing, and MIDI voice allocation.
This fork exists to push emulation fidelity as high as it can go across the whole device family - SC-55 and SC-55mkII as much as SC-88, JV-880 and JV-1080, not any one of them in particular - by leveraging AI assistance for the reverse engineering that matching real hardware behavior requires: ROM structure analysis, envelope dynamics, and oscillator characteristics among them.
The following Roland Sound Canvas and synthesizer modules are emulated. None of them is complete; the Engine column says which synthesis path each one runs on and how that path was derived, which says more about what to expect from it than a completeness label would.
| Device | Engine | Details |
|---|---|---|
| SC-55 | Class G shared pipeline | Firmware 1.21; oscillator and TVA working; TVF/reverb incomplete |
| SC-55mkII | Class G shared pipeline | Firmware 1.01; enhanced from SC-55; GM mode support |
| SC-88 | Class X, firmware port | Full ROM-driven engine with 64-voice polyphony; SC-88's own synthesis path |
| JV-880 | Class G shared pipeline | Sampled sound module; device profile extracted; synthesis in progress |
| JV-1080 | Class X, behavioural model | 64-voice synth module; its synthesis firmware sits in an undumped mask ROM, so presets and effect data are read exactly from the ROM but the voice path is fitted to measurements of real hardware and is not firmware-exact; plays end to end with reverb, chorus and part of its forty insert-effect types |
Class G and Class X are Roland's two sound-generator chip designs; SC-88 and
JV-1080 share one. libemusc/src/engines/xp/README.md explains the split,
and why one Class X device is a port of its firmware while the other is a
model of its measured behaviour.
Behaviour that differs from what a General MIDI file expects:
- JV-1080: no GS mode, and it does not power on in GM mode. It boots into
its own patch mode, with one patch on channel 1.
emusc-render --reset gmand--reset gsboth put it in GM mode (so does the default),--reset noneleaves it in patch mode.emuscdandemusc-winmidialways reset the device on startup, so they leave it in GM mode. - JV-880: powers on in a layered performance, not a multitimbral one. Its
boot performance stacks copies of one patch on channel 1 and leaves most
other channels silent. A host reset selects the Preset B performance "for
CompuMix" instead, the multitimbral setup the ROM's own demo songs select;
emusc-render --reset noneskips that and keeps the layered boot state.
This is active reverse-engineering research, not a finished emulator, and fidelity
varies by device and by subsystem as the underlying ROM analysis progresses. A
static feature checklist goes stale faster than the code does and can't capture
which gaps apply to which device, so there isn't one here: read libemusc/src/
or recent commit messages for what's actually implemented right now.
ROMs are never distributed with this project — you must supply your own dumps from hardware you own. Once you obtain ROM files, place them in a directory and pass that directory to either emusc-render or emuscd.
All five supported devices use the same unified naming scheme:
- Control/program ROM:
<device>_control.bin(required for all devices) - CPU ROM:
<device>_cpu.bin(required only for SC-55 and SC-55mkII) - Wave/PCM ROMs:
<device>_waverom1.bin,<device>_waverom2.bin, etc., in bank order (required for all devices)
<device> is one of: sc55, sc55mkii, sc88, jv880, jv1080.
emusc-render, emuscd and emusc-winmidi all resolve ROM files using this
same naming convention, in the same directory: --rom-dir DIR if given, else
$EMUSCD_ROM_DIR if set, else ./roms if it exists, else
/usr/share/emuscd/roms (.\roms on Windows).
You can verify your ROM dumps match known-good versions by checking their SHA1 and MD5 hashes:
| File | Size | SHA1 | MD5 |
|---|---|---|---|
sc55_cpu.bin |
32768 | dd01ec54027751c2f2f2e47bbb7a0bf3d1ca8ae2 |
462cb3a2ce9e54f4e54a52f643931ffd |
sc55_control.bin |
262144 | 9c17f85e784dc1549ac1f98d457b353393331f6b |
6b61186953b50d900e430ae6a996bda7 |
sc55_waverom1.bin |
1048576 | 8cc3c0d7ec0993df81d4ca1970e01a4b0d8d3775 |
5f40d5297f47358ddea43b8d225874cc |
sc55_waverom2.bin |
1048576 | 80e6eb130c18c09955551563f78906163c55cc11 |
f78fb079a7d8c5f1eb04e0fd5aedbc9e |
sc55_waverom3.bin |
1048576 | 7454b817778179806f3f9d1985b3a2ef67ace76f |
53c013d4bad0337385cfda2631e5b78e |
| File | Size | SHA1 | MD5 |
|---|---|---|---|
sc55mkii_cpu.bin |
32768 | b91bb1d9dccffe831b7cfde7800a3fe32b2fbda6 |
4ca058f7db05f51e97bb30a162e9610a |
sc55mkii_control.bin |
524288 | 078cb5feea05e80bb9a1bb857a2163ee434fd053 |
63b24c7193ce34afefce9cec32ac39f0 |
sc55mkii_waverom1.bin |
2097152 | 96708cb21381c2fd03de4babbf7aea301c7594a6 |
30df645acf7f1b621d5f2891ea53e00b |
sc55mkii_waverom2.bin |
1048576 | 4d91cdeaed048d653dbf846a221003c3a3f08279 |
f86e0433a11707a048a8a79e8d98a3be |
| File | Size | SHA1 | MD5 |
|---|---|---|---|
sc88_control.bin |
524288 | 3bc9a68703bd09459283b6b45d01d08feaffb744 |
0ac771782ea58a53af590ebdf140d517 |
sc88_waverom1.bin |
2097152 | 860dcd9804ded4cd46aab38bfc3764a1ad7a6b65 |
6a92b7de3ac7b8205d29ec4497644beb |
sc88_waverom2.bin |
2097152 | ac95c26c46c40aacb944f5d45634c93bee9e6d90 |
d98f4b255d3a7dc830d92c71c25ce2eb |
sc88_waverom3.bin |
2097152 | d88bf13c3d74097991b783295d95ccfae2c9282d |
c05b103d4db110b3962431173cc72967 |
sc88_waverom4.bin |
2097152 | 03e70ae2efd190f41af24be01b1abaa84bfa93d9 |
bccc26c34cac0d5509e8efb645043b5b |
| File | Size | SHA1 | MD5 |
|---|---|---|---|
jv880_control.bin |
262144 | 282116e8e8471053cf159d22675931592b7f7c8f |
06d10ee0657359e030e2cb0e5b1a4a20 |
jv880_waverom1.bin |
2097152 | 37e28498351fb502f6d43398d288a026c02b446d |
da2349eee9a070af536479ddb2a6b259 |
jv880_waverom2.bin |
2097152 | 963ce75b6668dab377d3a2fd895630a745491be5 |
357f717bba6ea84028ec53d6d35c2d6d |
| File | Size | SHA1 | MD5 |
|---|---|---|---|
jv1080_control.bin |
1048576 | 77f09efecf267def69b4e8f851cf124798347c03 |
6a950fe278c88d33b3b60f936abcedca |
jv1080_waverom1.bin |
2097152 | 6b9a177f3ac6560e27befbcb9e907cf369f0f28a |
3a2b61cf66ed3edc447a762accd5fc40 |
jv1080_waverom2.bin |
2097152 | 0dffa4ab4b9ea86c338fe146d902810f66c36cfd |
ab91066ef997237039655ad676195746 |
jv1080_waverom3.bin |
2097152 | 21eff48c6efe434ffce89c3bc61fe2b6d1584d00 |
d42c1efacde5cff241e9e5be0d183d4e |
jv1080_waverom4.bin |
2097152 | a1732be64e9c86c559df9c715703bcabc2a83440 |
f6448c563ce0df27d18bb59abc58ab72 |
-
libemusc/— The core C library implementing:- ROM-based voice tables, waveforms, and device profiles
- Synthesis engines (SC-55 generation and SC-88)
- TVA envelope tracking with parameterized stages
- Pan, pitch, and expression control
- MIDI device interface for polyphonic playback
-
libemusc/tools/emusc-render— MIDI-to-WAV renderer, and MIDI-to-speakers with--play:- Parse Standard MIDI Files (SMF format 0 & 1)
- Deterministic, sample-accurate event scheduling
- Load SC-55/SC-88 ROM sets automatically
- Configurable output rate and GM/GS reset mode
- Reproducible output via fixed random seed
--play: straight to the sound card as it renders (ALSA on Linux, DirectSound or WinMM on Windows, see--audio-api), no OS or user MIDI player in the way; combine with--outto render a file and listen at the same time
-
libemusc/tools/— Analysis and test utilities:- ROM dumping and sample extraction
- Oscillator testing and validation
- Envelope tracing and curve fitting
- TVF probe and characterization
-
libemusc/tests/— Unit tests for core synthesis components
Requirements for Linux:
- CMake 3.12+
- GCC or Clang
- ALSA development libraries (for
emuscd)
Requirements for 32-bit x86 and ARM Linux (cross-compilation from an x86_64 host):
- 32-bit x86:
gcc-multilib g++-multilib libc6-dev-i386, plus the i386 architecture's own ALSA dev files (dpkg --add-architecture i386thenlibasound2-dev:i386) - 32-bit ARM (armhf):
gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf, plusdpkg --add-architecture armhfthenlibasound2-dev:armhf - 64-bit ARM (aarch64):
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu, plusdpkg --add-architecture arm64thenlibasound2-dev:arm64 - CMake 3.12+
Requirements for Windows (cross-compilation from Linux):
mingw-w64cross-compiler packages:- 64-bit:
gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 - 32-bit:
gcc-mingw-w64-i686 g++-mingw-w64-i686
- 64-bit:
- CMake 3.12+
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
cmake --build build --target test # Run testsThe library is built as build/libemusc/src/libemusc_static.a (static) and libemusc.so (shared), and tools as build/libemusc/tools/emusc-render and build/emuscd/emuscd.
cmake -B build-linux-x86 -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-linux-i686.cmake -DCMAKE_BUILD_TYPE=Release
cmake -B build-linux-arm32 -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-linux-armhf.cmake -DCMAKE_BUILD_TYPE=Release
cmake -B build-linux-arm64 -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-linux-arm64.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build build-linux-x86
cmake --build build-linux-arm32
cmake --build build-linux-arm64Each produces emusc-render and emuscd for that architecture, statically
linked against libgcc/libstdc++ like the native build; emuscd still links
ALSA dynamically, against that architecture's own libasound.so.
64-bit:
cmake -B build-win64 -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-mingw-w64.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build build-win6432-bit:
cmake -B build-win32 -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-mingw-w32.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build build-win32Each produces two files: emusc-render.exe (the CMake target names don't change
with architecture) and emusc-winmidi.exe; CI renames the 32-bit ones to
emusc-render32.exe/emusc-winmidi32.exe when it publishes both side by side,
matching scva-headless's own -render/-render32 convention.
The resulting .exe files are self-contained, statically linked (-static-libgcc -static-libstdc++), and depend only on core Windows DLLs (KERNEL32.dll, msvcrt.dll, and WINMM.dll for emusc-winmidi), so they run on Windows 98 onwards without any additional runtime installation - see "Hardware Floor" below for what that claim does and doesn't cover.
emuscd (the realtime ALSA MIDI daemon) is Linux-only - it's built on top
of ALSA, which doesn't exist on Windows - so it isn't built for Windows at all.
emusc-winmidi is its Windows counterpart: same idea (realtime MIDI in,
realtime audio out via libEmuSC), built on WinMM instead of ALSA. It does not
create its own MIDI port the way emuscd's ALSA "virtual:" port does - WinMM's
midiIn API only opens an existing one - so route MIDI into it with a virtual
MIDI cable (loopMIDI on Windows 7+, Maple Virtual MIDI Cable on 95/98/ME/2000/XP),
then point --midi-in at that port:
emusc-winmidi --device sc55mkii --list-midi-in # find the port
emusc-winmidi --device sc55mkii --midi-in 1
emusc-winmidi --device sc55mkii --midi-in "loopMIDI Port"emusc-winmidi --help covers --wave-out, --rate, --block and --latency,
which parallel emuscd's own --pcm/--rate/--block/--latency.
CI (.github/workflows/main.yml) automatically builds six architecture
variants on every push - Linux x64, Linux x86, Linux ARM64, Linux ARM32,
Windows x64 and Windows x86 - and, on pushes to main, publishes each as a
.tar.gz GitHub release asset under the nightly tag: emusc-linux-x64.tar.gz,
emusc-linux-x86.tar.gz, emusc-linux-arm64.tar.gz,
emusc-linux-arm32.tar.gz, emusc-windows-x64.tar.gz and
emusc-windows-x86.tar.gz. Each archive is a self-contained bundle built
from this project's own install() rules: bin/ holds emusc-render plus
emuscd (Linux/ARM) or emusc-winmidi (Windows, named emusc-render32.exe/
emusc-winmidi32.exe on the 32-bit Windows build); lib/ holds the shared
libemusc library (.so/.dll, plus the Windows import library) for
anyone who wants to link against it directly rather than use the bundled
tools; include/emusc/ and lib/pkgconfig/ hold its headers and
pkg-config file. The Linux archives are built on Debian bookworm, so they
run on any distribution with glibc 2.36 or newer. Each nightly publish
replaces the previous release outright, so it always reflects exactly the
latest push rather than
accumulating older builds' files alongside newer ones.
This section provides a theoretical minimum hardware specification for the new Windows binaries (emusc-render and emusc-winmidi, in both 64-bit and 32-bit variants), derived from performance measurements on modern hardware and historical reference points. This is not a verified, tested specification. Genuine real-hardware validation across period-appropriate systems (Windows 98 through current releases, ideally with era-adjacent hardware) is essential before any of these estimates should be trusted for actual deployment.
The 64-bit builds (emusc-render.exe and emusc-winmidi.exe) have an architectural floor independent of emulation considerations: x86-64 instruction set architecture mandates SSE2 as a baseline, which eliminates all CPUs predating x86-64's introduction (~2003). More importantly, Windows 98 is a 32-bit-only operating system and cannot execute 64-bit code; 64-bit Windows did not exist until Windows XP Professional x64 Edition (2005).
The practical floor for 64-bit builds is therefore any x86-64 CPU, running 64-bit Windows XP x64 or later. This floor is purely architectural and has nothing to do with retro or Windows-98-era hardware.
The 32-bit builds (emusc-render32.exe and emusc-winmidi32.exe) are the candidates for lower-end hardware. The CPU floor is more nuanced than it initially appears.
This project's own C/C++ code is compiled with -march=pentium3 -mtune=generic, an intentional floor chosen for SSE1: MMX, SSE, FXSR and CMOV, and nothing beyond that - notably not AMD's 3DNow!/3DNow!A, so the same binary runs on an Intel Pentium III just as well as an AMD Athlon XP/Duron. -mtune=generic keeps instruction scheduling from being biased toward either vendor's pipeline. This already meets or exceeds the Pentium-Pro-level floor (CMOV, FCOMI) that the statically-linked MinGW runtime (libstdc++.a/libgcc.a, built for the distro's default mingw-w64 pentiumpro target) would otherwise impose as an unintentional side effect, so that side effect is no longer the binding constraint.
The shipped 32-bit binary's CPU floor is therefore Pentium III, AMD Athlon XP/Duron, or any later SSE1-capable x86 CPU (1999 onward). This is a deliberate choice, not a limitation: SSE1 is required, not merely tolerated.
Getting the performance benefit of SSE1 for this DSP-heavy code requires -mfpmath=sse in addition to -march: GCC does not switch scalar float/double arithmetic off the x87 FPU just because the target ISA supports SSE. Switching to SSE math is not purely a compile-time detail, though - x87 evaluates intermediate results at 80-bit extended precision while SSE uses strict 64-bit doubles, and these round differently. Measured directly by rendering the same MIDI files through x87-only and SSE-math builds and diffing every 16-bit PCM sample: 0.002%-0.055% of samples differ across SC-55/SC-88/JV-880, always by exactly ±1 out of 32768 full scale (about -96 dBFS) - the same order of magnitude as ordinary dither noise, and confirmed inaudible. The build also enables -O3 -pipe and the value-preserving subset of -ffast-math (-fno-math-errno -fno-trapping-math -fno-signaling-nans, which skip errno/exception bookkeeping without permitting reassociation or precision-lowering); the full -ffast-math bundle is deliberately not used, since this project measures its arithmetic against the real hardware's own precision and relies on byte-exact reproducibility to verify it.
From a Windows version perspective, DLL dependency analysis shows that msvcrt.dll (required by these binaries) was not part of Windows 95's original release but was included as a base OS component from Windows 98 onwards. The floor is Windows 98 for these reasons.
For SC-55 and SC-55mkII-class emulation (the lower-complexity synthesis paths), rendering measurements on modern hardware show approximately 74x realtime at 44.1 kHz, single-threaded, no SIMD, on a ~5 GHz core. Historical reference points (Roland's own VSC-88 shipped with a Pentium-166 MHz target in 1997; TiMidity documented ~100 MHz for 32 kHz General MIDI synthesis) suggest that Pentium-Pro, Pentium II, or Pentium III-class CPU may plausibly sustain realtime SC-55/SC-55mkII synthesis, though this remains untested.
For SC-88-class emulation (64-voice polyphony, fuller effects chains), the code is approximately 8x more expensive per second of audio than the SC-55 path when measured on the same modern hardware. Achieving realtime SC-88 on historical Pentium-166-era hardware is optimistic and unproven. Roland's own hand-optimized SC-88 product (VSC-88, 1997) was hand-written and likely assembly-optimized; this project's current generic, unoptimized C/C++ SC-88 code has a much larger gap to close before hitting that target, making it an uncertain extrapolation.
The new realtime MIDI daemon, emusc-winmidi, was:
- Built successfully, cross-compiling for Windows with no additional DLL dependencies beyond KERNEL32.dll, msvcrt.dll, and WINMM.dll.
- Functionally tested under Wine (a Windows compatibility layer running on Linux): the binary opened a real ALSA-backed MIDI input port through Wine's WinMM implementation and a real PulseAudio audio output device, then ran without crashing for a sustained period while a dense, multi-minute MIDI file was played into that port in real time. This verifies the MIDI-callback → queue → synthesis → audio-buffer pipeline runs without crashing under real MIDI load - it does not verify that the audio it produced was glitch-free or kept pace without underruns, which was never measured (see below).
What was not tested:
- Genuine Windows (any version, 98 through 11)
- Period-era or period-adjacent hardware
- Audio correctness or fidelity (output was never captured or auditioned, only confirmed not to crash)
- Wine's WinMM callback timing and buffer-underrun behavior, which may diverge significantly from real Windows drivers, especially on 9x-era hardware
Before deploying emusc-winmidi to actual hardware, real-hardware testing on Windows 98, XP, and a modern 64-bit release is essential.
The two ARM builds have stated ISA floors, set in their toolchain files rather
than inherited from whatever the cross-compiler defaults to, and checked
against the objects the build produces by cmake/check-baseline.sh:
- 32-bit ARM (
emusc-linux-arm32.tar.gz): ARMv7-A with hard-float VFPv3-D16 and no NEON. VFPv3-D16 is the 16-double-register form every ARMv7-A VFP implementation has, so the binary runs on an ARMv7-A system with no NEON unit at all. It carries no fused multiply-add, which means this build's arithmetic never contracts a multiply and an add into a single rounding. - 64-bit ARM (
emusc-linux-arm64.tar.gz): baseline ARMv8-A, not a particular Cortex implementation. Advanced SIMD is mandatory in ARMv8-A and the compiler is free to use it; nothing beyond ARMv8.0 is, so no LSE atomics, CRC32, crypto, dot product or SVE. Unlike ARM32 this baseline does have a fused multiply-add and the compiler contracts with it, so the two ARM builds do not produce bit-identical output to each other - ARM32's matches the x86-64 build's, ARM64's does not.
Both builds also use -O3 -pipe and the same value-preserving subset of
-ffast-math as the Windows build (-fno-math-errno -fno-trapping-math -fno-signaling-nans), verified byte-identical against a build without them
for SC-55, SC-55mkII, JV-880 and SC-88 at 32, 44.1 and 48 kHz under
qemu-arm and qemu-aarch64.
What is untested: everything about performance. No cycles-per-frame, callback-duration or underrun measurement has been taken on physical ARM hardware, so whether either build sustains realtime synthesis on any particular board is unknown.
This fork exists to reach the highest fidelity achievable on every supported device - SC-55 and SC-55mkII included, not just SC-88 - which in practice means detailed ROM analysis, measurement of envelope behavior, and reverse engineering of oscillator characteristics against the real hardware each device is modelled on. This work was substantially assisted by Claude (an AI assistant), which helped:
- Analyze ROM structures and extract device profiles
- Test and validate TVA envelope curve fitting
- Implement parameterized oscillator stages
- Trace MIDI voice allocation behavior
AI Involvement: Following the kernel.org coding-assistants convention, all commits carrying AI assistance include an Assisted-by: Claude:<model> trailer. The human author retains full responsibility and is listed as the author of record.
Why separate from upstream? The upstream EmuSC project focuses on a polished GUI application for end-users. This fork prioritizes library development, low-level analysis, and exploration driven by reverse engineering. The two projects have different goals and audiences.
libemusc/library: LGPL-2.1-or-later (from upstream)- New code in this fork: Dedicated to the public domain under CC0 1.0
See LICENSE.md for the full text of both licenses and
exactly which paths each one covers.
This is not affiliated with or endorsed by:
- Roland Corporation (original hardware manufacturer)
- The upstream EmuSC project (https://github.com/skjelten/emusc)
This fork respects the upstream's open-source licenses (LGPL/GPL) and retains proper attribution to original code and authors.
This research fork is actively exploring:
- SC-88 immutable ROM graph and parameterized voice engine
- TVA envelope behavior across different devices
- TVF (filter) curve extraction and modeling
- Oscillator stage interpolation and coefficient precision
- MIDI voice allocation and priority behavior
- Effects processing (reverb, chorus, EQ)
Once ROMs are obtained and placed in a directory, use emusc-render to render a Standard MIDI File to WAV.
With one device's ROMs in ./roms (or $EMUSCD_ROM_DIR), only the input is needed:
./build/libemusc/tools/emusc-render input.midThis writes input.wav to the current directory. The device is the one whose
<device>_control.bin is in the ROM directory; if there is more than one, or
none, it stops and lists what it found, and --device picks one. The output
rate defaults to 32000 Hz. For the SC-88 and JV-1080 that is the device's own
rate; for the SC-55, SC-55mkII and JV-880 it is a commonly published figure
this project has not verified, and each run that falls back to it says so.
Render an SC-88 MIDI file:
./build/libemusc/tools/emusc-render \
--device sc88 \
--rom-dir /path/to/roms \
--rate 44100 \
input.mid output.wavRender an SC-55 MIDI file:
./build/libemusc/tools/emusc-render \
--device sc55 \
--rom-dir /path/to/roms \
--rate 44100 \
input.mid output.wavAlternative: use named flags for scripting:
./build/libemusc/tools/emusc-render \
--device sc88 \
--rom-dir /path/to/roms \
--rate 44100 \
--midi input.mid \
--out output.wavListen instead of (or as well as) writing a file, with --play:
./build/libemusc/tools/emusc-render \
--device sc88 \
--rom-dir /path/to/roms \
--rate 44100 \
--play \
input.midNo output file is required with --play; give both --play and --out/output.wav to render and listen at the same time. Audio goes straight to the sound card - ALSA on Linux, WinMM on Windows, including the 32-bit Windows binaries - so no OS or user MIDI player needs to sit in the way. The run is paced by the audio device itself and takes as long as the song does, rather than rendering as fast as possible.
See emusc-render --help for all options: --reset (GM/GS mode), --tail (trailing silence), --seed, --bits (16-bit or 32-bit float), --float, --gain-db (output gain, see below), --play, --verbose, and more.
Turn a quiet render up, --gain-db: a linear multiplier (10^(DB/20)) applied to the final samples right before they're quantized to 16-bit (or clamped to ±1.0 for --float). Default 0 (no change at all - a render without this flag is byte-identical to one with --gain-db 0). It is a listening-convenience knob only, applied after everything libEmuSC itself computes; it never changes libEmuSC's own signal path or any hardware-fidelity measurement, and emuscd/emusc-winmidi accept the same flag with the same meaning for real-time playback.
./build/libemusc/tools/emusc-render --gain-db 6 input.mid louder.wavPush it too far and the same "N samples at full scale" warning that reports the engine's own clipping reports this too, rather than clipping silently.
emuscd is a realtime ALSA MIDI daemon for Linux that synthesizes MIDI input through libEmuSC and outputs audio to your sound card. It runs in the background, allowing you to play MIDI files or live input through a standard ALSA MIDI sequencer port.
Set the $EMUSCD_ROM_DIR environment variable to your ROM directory, or pass --rom-dir instead, then start the daemon:
export EMUSCD_ROM_DIR=/path/to/roms
./build/emuscd/emuscd --device sc88 --name emuscdCommon options:
--device NAME Device to emulate (default: sc88); sc55, sc55mkii, sc88, jv880, jv1080
--reset MODE gs or gm: keep every device in that mode whatever SysEx it is
sent; one without it is kept in the other (default: neither)
--name NAME ALSA MIDI port name (default: emuscd)
--midi-in PORT Also connect from an existing MIDI input: index, or name or part of one
--list-midi-in List MIDI input ports and exit
--pcm DEVICE ALSA PCM output device (default: default)
--list-pcm List ALSA PCM devices and exit
--rom-dir DIR Directory holding device ROM files (default:
$EMUSCD_ROM_DIR, else ./roms if it exists,
else /usr/share/emuscd/roms)
--rate HZ Requested audio sample rate (default: 48000)
--latency MS Requested output buffer size in ms (default: 20)
--block N Audio frames per ALSA write (default: 256)
--threads N Threads the SC-88 and JV-1080 render their voices on,
this one included; 0 is one per CPU the process may
use (default: 0). The audio is the same at every count
--cpus LIST Pin the render threads one per CPU in LIST (e.g. 0-3):
this thread on the first, the pool's from the last
down, so a core kept out of scheduling (isolcpus)
still gets one. Without --threads, one per CPU listed
--stats Every 5 s on stderr: render time per block as a
share of its playing time (avg, p99, max)
--help Show full help
You can then connect MIDI input using aconnect:
aconnect -l # List ALSA ports
aconnect 24:0 'emuscd':0 # Connect a sequencer port to emuscd
emuscd --midi-in "Your Keyboard" # ...or have emuscd connect it at startup
aplaymidi -p 'emuscd' song.mid # Play a MIDI fileFor detailed configuration and advanced options, see the
Linux section of emuscd/README.md.
emusc-winmidi is emuscd's Windows counterpart: a realtime MIDI-in/audio-out
device built on WinMM instead of ALSA. Unlike emuscd it does not create its
own MIDI port - WinMM's midiIn API only opens an existing one - so route
MIDI into it with a virtual MIDI cable (loopMIDI on Windows 7+, Maple Virtual
MIDI Cable on 95/98/ME/2000/XP), then point --midi-in at that port.
Set the EMUSCD_ROM_DIR environment variable to your ROM directory, or pass
--rom-dir instead (falls back to .\roms, relative to the working
directory, if neither is given), then start it:
set EMUSCD_ROM_DIR=C:\path\to\roms
emusc-winmidi.exe --list-midi-in
emusc-winmidi.exe --device sc88 --midi-in 1
emusc-winmidi.exe --device sc88 --midi-in "loopMIDI Port"Common options:
--device NAME Device to emulate (default: sc88); sc55, sc55mkii, sc88, jv880, jv1080
--midi-in PORT MIDI input device: index, or name or part of one (default: 0)
--reset MODE gs or gm: keep every device in that mode whatever SysEx it is
sent; one without it is kept in the other (default: neither)
--wave-out N Wave output device index (default: system default)
--list-midi-in List MIDI input devices and exit
--list-wave-out List wave output devices and exit
--rom-dir DIR Directory holding device ROM files (default:
%EMUSCD_ROM_DIR%, or .\roms if unset)
--rate HZ Audio sample rate (default: 48000)
--block N Audio frames per wave buffer (default: 256)
--latency MS Requested output buffer size in ms (default: 20)
--help Show full help
For detailed configuration and advanced options, see the
Windows section of emuscd/README.md.
This is exploratory research code. For questions about:
- The library API: Read
libemusc/src/synth.h(public interface) - ROM extraction: See the corpus and PROVENANCE documentation
- Reverse engineering: Check git history and commit messages for detailed analysis notes
- SC-88 specific: Look at
libemusc/src/sc88_*.cfiles and their corresponding research artifacts - Alternatives: Nuked SC-55 or SC-55 Soundfont for other approaches
- Upstream EmuSC: See https://github.com/skjelten/emusc for the polished GUI application