0e77adb4c3fa3a875ed62bbd4a0d6ffae534e7b1
- Full FFT overlap-add IR convolution in IRLoader (process(), set_mix(), toggle) - Lazy FFT computation — IR FFT padded to correct block+ir size on first process() - Wet/dry mix control, enabled/disabled toggle with tail clearing - Fixed pipeline._apply_ir_cab() to delegate to IRLoader.process() instead of poking internals (old code had array-size mismatch bug: IR FFT at ir_len vs block FFT at conv_size) - 46 tests: loading, convolution correctness, overlap-add state, mix, toggle, directory listing, performance budget (all <5ms even at 8192 taps), edge cases - scripts/download_irs.sh: free IR pack downloader (God's Cab, Seacow)
Pi Multi-FX Pedal 🎸
A real-time guitar multi-FX pedal running on Raspberry Pi 4B with:
- NAM A2 neural amp modeling — load and switch between capture profiles
- IR cab simulator — impulse response convolution for cabinet simulation
- Multi-FX chain — noise gate, compressor, overdrive/distortion, EQ, modulation (chorus/flanger/phaser/tremolo), delay, reverb
- MIDI in/out — foot controller, expression pedal, preset switching via Program Change
- Stomp-friendly UI — footswitches, RGB LEDs, OLED display, tuner
Architecture
Guitar → I2S ADC → JACK Audio → DSP Pipeline → I2S DAC → Amp/Headphones
│
┌──────────┴──────────┐
│ NAM LV2 Plugin │
│ (neural amp sim) │
├─────────────────────┤
│ IR Convolver LV2 │
│ (cabinet sim) │
├─────────────────────┤
│ LV2 FX Chain │
│ (mod/delay/verb) │
└─────────────────────┘
Signal Chain
Input → Gate → Comp → Boost → NAM Amp → IR Cab → EQ → Mod → Delay → Reverb → Volume → Output
│ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │
┌────┴───┐ ┌─┴──┐ ┌──┴───┐ ┌─┴─────┐ ┌──┴──┐ ┌─┴──┐ ┌──┴──┐ ┌───┴──┐ ┌───┴──┐ ┌──┴───┐
│Noise │ │Dyn │ │Drive │ │Neural │ │IR │ │EQ │ │Mod │ │Delay │ │Reverb│ │Master│
│Gate │ │Comp│ │Boost │ │Amp │ │Cab │ │ │ │ │ │ │ │ │ │Volume│
└────────┘ └────┘ └──────┘ └───────┘ └─────┘ └────┘ └─────┘ └──────┘ └──────┘ └──────┘
Hardware
| Component | Spec |
|---|---|
| SBC | Raspberry Pi 4B (2GB+ RAM) |
| Audio I/O | I2S DAC + ADC (e.g. PCM1808 + PCM5102, or an Audio HAT) |
| Footswitches | 3-6 momentary soft-touch (e.g. MXR-style) |
| LEDs | RGB WS2812B or APA102 per footswitch + status LEDs |
| Display | 128x64 OLED SSD1306 (I2C) or small TFT |
| MIDI | 5-pin DIN in/out via UART + optoisolator |
| Power | 5V/3A USB-C (with buck for 3.3V rail) |
| Enclosure | 1590BB or 3D-printed custom |
Project Structure
├── src/
│ ├── dsp/ Audio processing pipeline
│ │ ├── pipeline.py FX chain orchestration
│ │ ├── ir_loader.py IR convolution engine
│ │ ├── nam_host.py NAM model loading & inference
│ │ └── level.py Input/output level + tuner
│ ├── midi/ MIDI subsystem
│ │ ├── handler.py MIDI event parse & dispatch
│ │ └── presets.py PC → preset mapping
│ ├── ui/ Hardware UI layer
│ │ ├── footswitch.py Debounced GPIO input
│ │ ├── leds.py RGB LED controller
│ │ └── display.py OLED display manager
│ ├── presets/ Preset system
│ │ ├── manager.py Save/load/bank/preset CRUD
│ │ └── types.py Preset & chain data model
│ └── system/ System integration
│ ├── audio.py ALSA/JACK/I2S configuration
│ └── setup.py First-boot setup scripts
├── scripts/ Build & utility scripts
├── tests/ Tests
├── docs/ Documentation
└── hardware/ KiCad/PCB schematics
Development Quick Start
# Clone
git clone https://gitea.ourpad.casa/shawn/pi-multifx-pedal.git
cd pi-multifx-pedal
# Install dependencies
pip install -r requirements.txt
# Run tests
python -m pytest tests/ -v
Status
Early development — initial scaffold.
Description
RPi 4B guitar multi-FX pedal — NAM A2 amp modeling, IR cab sim, multi-FX chain, MIDI foot controller
Languages
Python
68.9%
JavaScript
9.3%
Shell
9.1%
HTML
5.7%
TypeScript
4.8%
Other
2.2%