A separate firmware image exposes the polyphony and voice-quality controls at runtime, logs the FM-1's render cost over USB serial and exposes the same 24-bit output as a USB audio input. It exists to find safe profiles on real hardware, not to ship knobs.
REED_LAB=1 ./firmware/build.sh # firmware/build-lab/reed-lab.bin # USB product: "FM-1 Reed LAB" # release build: ./firmware/build.sh -> reed.bin
Not a release. The lab image is for measurements on your own unit. It has not been validated on hardware. Keep a known-good image and the recovery path at hand.
| Control | Range | Practical effect |
|---|---|---|
| VOICES | 1..32 | How many notes can sound together; above the limit the oldest/quietest voice is stolen. Real CPU cap. |
| MODES | 1..7 | Modal partials per voice. 7 = full detail; 5/3 removes the faint upper partials and attack “metal”. |
| PICKUP | full / lite | Full nonlinear overlap law (bark, even harmonics); lite linearizes it for CPU. |
| NOISE | on / off | 15 ms hammer attack noise. Small CPU; audible mechanical transient. |
| DRAG | on / off | Amplitude-dependent loss on mode 1 (growl). Tiny CPU. |
| CHAIN | full / lite | Full preamp/amp/speaker vs a flatter chain. Small CPU; large timbre change. |
| MASTER | −24..+6 dB | Output gain (clamped at full scale) for fair comparisons and safe listening. |
The parameters are real: voice allocation respects the limit, the mode
loop stops at MODES, and the lite pickup is a different function — not a label
over the full engine.
The capture runner sets profiles over USB-MIDI CCs, then plays the song on the same port. Any MIDI channel is accepted.
| CC | Parameter | Values |
|---|---|---|
| 20 | VOICES | 1..32 |
| 21 | MODES | 1..7 |
| 22 | PICKUP | 0 full, 127 lite |
| 23 | NOISE | 0 off, 127 on |
| 24 | DRAG | 0 off, 127 on |
| 25 | CHAIN | 0 full, 127 lite |
| 26 | MASTER | 0..30 = −24..+6 dB |
| 27 | COMMIT | >=64 |
| 120 / 123 | all sound off / all notes off | 0 |
| 1 / 7 / 11 / 64 | tremolo / volume / drive / sustain | existing |
CC20..26 only stage a profile; CC27 commits it. There is no MIDI acknowledgement, so the runner waits a settle time. The test song must not use CC20..27. USB MIDI only in this alpha; TRS/DIN MIDI is not implemented yet.
115200 8N1 over the CDC port; one line per command. Profiles are session-only: power-on returns to the default, so a bad setting cannot persist into a boot loop.
| Command | Meaning |
|---|---|
P voices modes pickup noise drag chain db | Set a profile (pickup/chain: 0 full, 1 lite; db −24..+6) |
S | active, limit, last/max render µs, late halves, CPU % |
C | clear the per-run max/late counters |
R | reset to HQ_8 |
X | panic / all notes off |
V | version |
P 16 5 0 1 1 0 0 OK 16 5 16777216 S STAT active=0 limit=16 last_us=1200 max_us=1800 late=0 cpu=41
The primary capture is the FM-1's P2 analog output
into an audio interface/line-in. The runner tools/lab/run_profiles.py does the
loop: send profile CCs → play the same MIDI song → record P2 → repeat. It is a WIP skeleton
until the hardware and song are chosen. UAC is an optional alternative; it is not required.
python3 tools/lab/run_profiles.py \ --midi-out "FM-1 Reed LAB" \ --audio-input "-f avfoundation -i :2" \ --song assets/lab/song.mid \ --profiles tools/lab/profiles.json \ --out captures/lab --repeats 3
Connect P2 to an audio interface, set a level that does not clip, and pass
that ffmpeg input. --serial is optional and only adds CDC telemetry. UAC is
optional too.
Profiles are session-only. No settings record, no boot loop from a saved profile.
Watchdog and two-failed-boots UBOOT guard remain in place. The lab image does not touch the loader/UBOOT.
No PLL, voltage, codec/amp register or raw-flash commands are exposed. Those are the changes that can make a unit hard to recover.
DSP load does not burn the SoC at stock clock. Sustained full-scale output can heat the speaker/amp; use a limiter and moderate volume.
FULL_32 is expected
to overrun. It exists to confirm the failure mode, not as a release profile.
High SPL is a health risk. Test with headphones at moderate level.
Still missing: the physical FM-1 on the bench, the MIDI song, the capture-device choice, the actual MP3s and the final profile decision. The script and the lab image are ready to be tested; no result is fabricated.