Guitar Pedal Firmware
Rust firmware for a Daisy Seed effects pedal, with the DSP in a no_std crate that still runs under cargo test on a laptop.
- Rust
- no_std
- Embedded
- STM32H750
- DSP
- C++
Firmware for the Cleveland Music Co. Hothouse, an effects pedal platform built on the Electrosmith Daisy Seed — an STM32H750 Cortex-M7 running mono audio at 96 kHz.
Two pedals share one platform library. Cassette LoFi Junky does Gen-Loss style tape degradation. Driftwood is a dual-engine ambient machine with independent time and space sections. Earlier C++ builds remain in the repository as bench references.
The part worth talking about
Embedded DSP is awkward to work on because the interesting code is the hardest to reach. A wrong coefficient sounds wrong, and the debugging loop is flash, listen, guess, repeat.
So the maths lives in its own crate that is no_std on the target and an
ordinary Rust library on a development machine. Bucket-brigade delay emulation,
PT2399-style reverb, saturation curves, pitch shifting, wow and flutter — all of
it is pure functions over buffers, with no allocator, no hardware types, and no
reference to the board. That crate has its own unit tests and they run in
milliseconds on a laptop.
What stays on the device is the part that genuinely needs to be there: the control-surface HAL reading six knobs, three toggles and two footswitches, the audio callback, and the DMA plumbing.
The split is not about tidiness. It means a filter can be wrong and provably wrong before anything is flashed.
Constraints that shape the code
There is no allocator and no floating-point luxury. The audio callback has a fixed budget at 96 kHz and missing it produces an audible click rather than a slow response, so the expensive parts — transcendentals, interpolation — use approximations chosen deliberately and tested against their exact forms.
Knob behaviour needed as much attention as the DSP. A linear taper across a 50 ms to 1600 ms delay range puts every musically useful value in the first eighth of the sweep, so the tapers are shaped to spend travel where a player actually listens.
It is a different discipline from the enterprise work — no observability, no rollback, and the only integration test is whether it sounds right through an amplifier — but the habits transfer more than I expected.