PreenFM2 (pfm2sid) MIDI CC chart, NRPN and OSC map
The PreenFM2 MIDI implementation: 2 SysEx commands, each named, for Claude (MCP), SuperCollider or any OSC app.
- sourcemaker's documentation
- firmwarepfm2sid-8031123
- real unitnot yet checked
Not checked on a real PreenFM2 yet. Own one? Load a sound or send a control, and tell us whether it worked.
- Maker
- PreenFM
- Version
- pfm2sid (SID synth firmware by Patrick Dowling)
- Source
- maker's documentation
- OSC prefix
/preenfm2_pfm2sid
From the README of patrickdowling/pfm2sid at 8031123, licence MIT (project code; reSID GPL-2.0-or-later).
PreenFM2 meets SID

What is it? A (emulated) SID synth playable via MIDI running on the PreenFM2 hardware platform.
Coming from BBC, Amstrad CPC and Atari ST I never really got into the details of the SID chip...
The midibox SID projects were tempting me but I also had a spare PreenFM2 with an older PCB revision lying around -- that and a few "I wonder ifs..." and this happened.
Basic features include:
- Polyphonic or unison mode
- All SID parameters should be editable
- Basic wavetables for waveform and pitch (although currently no editor)
- 3 LFOs with shape, rate, reset-on-key-pressed
- Modulation targets with selectable LFO and depth: osc frequency, PWM, filter frequency, resonance
- Glide (unison only)
- Switch between 6581 and 8580 emulation
- Runs at 44.1Khz on the 168MHz stm32f405 (see below)
Bonus features:
- ASID support over MIDI (switches on automatically on matching sysex)
- There's a SID file player that can play from a memory buffer. There's currently no (easy) way to get files in though.
Caveats
- It's only been run on my PreenFM2 R4 PCB with a LCD, i.e. "works for me".
- While it can optionally be built to hopefully support the original bootloader, this does cost the first 256K of flash. And I generally just upload via SWD or in gdb anyway.
- It wasn't necessary to implement a MIDI parser but I had some knowledge gaps to fill.
- DIN MIDI only.
- The UI is ad hoc, so it's mostly functional but not "designed".
- Some parameter ranges are just "first guess" so probably need some tweaking.
- Similarly modulation is still at the "basically works" stage but needs to be made more consistent.
- "tests" are mostly some plausibility checks.
- Bugs.
In summary it's more of a technical exercise with a (or yet another?) uninspired repo name, rather than anything approaching a "product" or even a proper "alt firmware" :)
SID Emulation
- Based on the "ancient" reSID version 0.16. This still seems "Good Enough" and while the following versions are much improved the footprint is bigger. Part of that c/should be
constexpr-able with some effort but 16MB tables are out for sure :) - Modifications to reSID were made to get it compiling and (eventually) strip out some unused functionality. Ideally they won't conflict too much with the upstream and are isolated commits.
- There are of course other SID implementations, e.g. I particularly like chips. Similarly, there are forks/mirrors of reSID, e.g. libsidplayfp.
- In order to simplify things, the code writes a batch registers at once, then calls
clocklater to generate a block of samples. - While this works, it isn't how hardware with a bus functions. Ideally (?) the register write/clock might be suitably interleaved (difficulty: output sample interpolation).
- This is maybe a "to investigate"?
- There's a caching layer to only write dirty registers through to the emulation.
So yes, this project is a super convoluted way of writing a few 8-bit registers :)
General Miscellany
- The "ADSR delay bug" is emulated. This could be made optional.
TODO-dilly-do
(In no particular order)
- clang-tidy, sanitizers (pending clang support in stm32x)
- Support 2 chips/instances of reSID::SID. May require smaller blocksize and/or sample rate adjustments but we're at ca. 50% load with one instance, so it "should work". Overclocking is also an option.
- Bump modulator update rate (currently ca. 1.3Khz). May also benefit from smaller block size.
- Arpeggiator
- Wavetable editor (and/or sysex uploads)
- Web editor?
- Patches
- Sysex
- CC
- USB
- Support preenfm2 bootloader?
Derp
- To
floator not tofloatseems to be a hard question :) - In any case, the mixed case seems to be the worst option because rounding is expensive. So this code tends towards fixed-point ops. Which, given the topic seems mostly appropriate anyway...
Use it
Find the MIDI ports, then start the bridge with this driver:
osc-bridge detect # prints the ready-to-run line for what is plugged in
osc-bridge run --device preenfm/preenfm2.vendor.fw-pfm2sid-8031123 --out-port <N> --in-port <M>
Then send OSC to 127.0.0.1:7777, for example:
From Claude or any MCP client, the osc-bridge mcp server exposes this driver as preenfm2_pfm2sid: ask “what can the PreenFM2 do?” and it reads this map with list_routes. See the MCP guide.
MIDI controls
2 controls, each with its number, its range and the name to send
SysEx commands
| Command | Arguments | Name to send |
|---|---|---|
| Asid start | /preenfm2_pfm2sid/asid/start |
|
| Asid stop | /preenfm2_pfm2sid/asid/stop |
Performance MIDI
Notes, pitch bend and any CC are also available: /preenfm2_pfm2sid/note/on <note> <velocity>, /preenfm2_pfm2sid/cc/<number> <value>, /preenfm2_pfm2sid/pitchbend <0-16383>, /preenfm2_pfm2sid/program_change <n>.
Limitations
pfm2sid at 8031123 (no published binary; built and flashed over SWD, or with the original bootloader at the cost of 256 KB). A different instrument on the PreenFM2 hardware: DIN MIDI only. In SID synth mode it plays notes and pitch bend on the receive channel set in its system menu; it handles no CC, Program Change or aftertouch. ASID SysEx (F0 2D ...) switches it to the ASID player on its own: start (4C), stop (4D), register frames (4E) and LCD text (4F) from an ASID host; only start and stop are mapped, the register frames are sent by the host software. Untested on hardware.
Firmwares
The PreenFM2 runs 2 firmwares SynthHub maps, each with its own MIDI or another's it shares. All the devices with several: firmwares.
| Firmware | From | Licence | MIDI | Sounds |
|---|---|---|---|---|
| 3.10 alpha | github.com/sscheidl | its own | ||
| pfm2sid | github.com/patrickdowling | its own |
Frequently asked questions
Can an AI agent like Claude control the PreenFM2?
Yes: SynthHub's hosted MCP server knows the PreenFM2's MIDI map, and its browser relay lets the agent send it parameter changes or load a sound, each sound change confirmed by you.