Initial scaffold: Pi Multi-FX Pedal with NAM A2, IR cab, multi-FX, MIDI, stomp UI

This commit is contained in:
2026-06-07 23:22:43 -04:00
commit ed29748a62
24 changed files with 6215 additions and 0 deletions
+97
View File
@@ -0,0 +1,97 @@
# 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.