six-operator FM · linux · aarch64
The FM-1 engine, on a Linux pocket computer.
The M5Stack Cardputer Zero is a Raspberry Pi CM0 running Debian — not a bigger ESP32. That changes everything about the port and nothing about the instrument: the same six-operator engine, now with real stereo, the FM-1's full 2 040 ms delay, and a library on the SD card.
The engine is bit-exact against upstream msfa at 48 kHz — 606 720 samples, zero mismatches.
the actual interface
A wider screen buys a layout, not a bigger font
At 240×135 every page had to be one column, so an operator page could show six values
and nothing else. At 320×170 there is room for a persistent 56 px context rail
beside a 258 px work area — which changes what a page can say. These images come
from ui_render(), the same function the program calls into its framebuffer.
They are not mock-ups.
fidelity
Same engine, new rate, still bit-exact
The stock FM-1's app.bin carries msfa's 32-row algorithm table
verbatim, which is why msfa is the fidelity target rather than a lookalike.
The Zero's ecosystem runs at 48 kHz, so the tables were regenerated and the upstream
reference rebuilt at 48 kHz — and the gate still passes.
| Gate | Result |
|---|---|
| Engine vs upstream msfa @ 48 kHz | 606,720 samples, 0 mismatches |
| Coverage | 32 algorithms × feedback 1–7, velocities 1–127, notes 0–127, release from every envelope stage, 6 LFO waves, pitch envelope, bend |
| Factory bank | sha256 ecad0b86…6aad25 = M-VAVE's published hash |
| Voice formats | 156-byte patch, 128-byte record, VCED, VMEM, FM-1 parameter write |
| MIDI | M-VAVE's own document, including the FX channel CC map |
| FX chain | 10 properties: bypass, isolation, filter response, delay timing, distortion bounds, noise soak |
storage
Everything that was in flash now lives on the card
On the ESP32 build the factory bank was 16 KB of const in flash and the
delay line had to be 12-bit packed to fit 512 KB of SRAM. Here the card holds it all,
and the binary stays small:
# library root, discovered from $FM1_LIBRARY, ../roms, or ~/roms <root>/bank/factory.fm1bank 128 voices, or a plain DX7 .syx <root>/bank/user.fm1bank your edits <root>/patches/ DX7 single-voice and 32-voice dumps <root>/samples/ user samples
Saves are atomic: write a temp file, fsync, rename, fsync the
directory. Pull the card out mid-save and you lose the newest file, never the working
library. The gate proves it by planting a stale .tmp and re-reading.
reproduce it
Build it
Six gate suites run on any Linux or macOS box in a few seconds. No hardware needed.
# the gates git clone https://github.com/NaustudentX18/fm1-zero cd fm1-zero tools/fetch_msfa.sh # vendor the Apache-2.0 reference tools/run_tests.sh # engine, bank, MIDI, FX, UI, storage # the program make # needs libasound2-dev ./fm1-zero ~/roms default
Not yet run on the Cardputer Zero
The hardware has not arrived. The program compiles, links and runs on a desktop —
ALSA opens at 48 kHz, the library is discovered, the keypad is found by probing
evdev capabilities rather than guessing a device node — but
/dev/fb0, the ES8389 card index and the real 46-key legend are
unverified. docs/status.md splits every claim into
verified / unexecuted / not started.
licence
Apache-2.0
Engine ported from msfa (Apache-2.0); factory bank is M-VAVE's V15 bank, also Apache-2.0. Felucca is an excellent GPL-3.0 firmware for the real FM-1 and is deliberately not used here, because taking it would force this project to GPL-3.0.
FM-1 and DX7 are trademarks of their owners. Not affiliated
with M-VAVE, Yamaha, M5Stack or Hügelton Instruments.