# 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 ```bash # 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.