Laboratory build · measurement tool

Measure before
choosing a profile.

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.

Build the lab image

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.

What it exposes

ControlRangePractical effect
VOICES1..32How many notes can sound together; above the limit the oldest/quietest voice is stolen. Real CPU cap.
MODES1..7Modal partials per voice. 7 = full detail; 5/3 removes the faint upper partials and attack “metal”.
PICKUPfull / liteFull nonlinear overlap law (bark, even harmonics); lite linearizes it for CPU.
NOISEon / off15 ms hammer attack noise. Small CPU; audible mechanical transient.
DRAGon / offAmplitude-dependent loss on mode 1 (growl). Tiny CPU.
CHAINfull / liteFull preamp/amp/speaker vs a flatter chain. Small CPU; large timbre change.
MASTER−24..+6 dBOutput 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.

MIDI CC control (primary)

The capture runner sets profiles over USB-MIDI CCs, then plays the song on the same port. Any MIDI channel is accepted.

CCParameterValues
20VOICES1..32
21MODES1..7
22PICKUP0 full, 127 lite
23NOISE0 off, 127 on
24DRAG0 off, 127 on
25CHAIN0 full, 127 lite
26MASTER0..30 = −24..+6 dB
27COMMIT>=64
120 / 123all sound off / all notes off0
1 / 7 / 11 / 64tremolo / volume / drive / sustainexisting

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.

Serial protocol (telemetry)

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.

CommandMeaning
P voices modes pickup noise drag chain dbSet a profile (pickup/chain: 0 full, 1 lite; db −24..+6)
Sactive, limit, last/max render µs, late halves, CPU %
Cclear the per-run max/late counters
Rreset to HQ_8
Xpanic / all notes off
Vversion
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

Capture path

MIDI song→FM-1 USB-MIDI→ Reed LAB engine→P2 analog (UAC optional)→ ffmpeg→WAV / 320k MP3

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.

Safety

No flash writes

Profiles are session-only. No settings record, no boot loop from a saved profile.

Boot guard

Watchdog and two-failed-boots UBOOT guard remain in place. The lab image does not touch the loader/UBOOT.

No clock/rail access

No PLL, voltage, codec/amp register or raw-flash commands are exposed. Those are the changes that can make a unit hard to recover.

Speaker is the limit

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.

32 full is a failure test

FULL_32 is expected to overrun. It exists to confirm the failure mode, not as a release profile.

Hearing

High SPL is a health risk. Test with headphones at moderate level.

WIP

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.

Go to the profile-selection page →