Professional setup and configuration automation for Stompbox on Raspberry Pi 4/5. Tested on: Pi 4
Three production-ready Bash scripts for complete Stompbox automation:
| Script | Purpose | Runtime |
|---|---|---|
setup-stompbox.sh |
Install JACK, dependencies, real-time config, systemd service | ~5 minutes |
setup-hotspot.sh |
WiFi with automatic hotspot fallback at boot | ~2 minutes |
start-stompbox.sh |
Runtime startup script (launched by systemd) | Auto |
# 1. Clone the Stompbox repository
git clone https://github.com/mikeoliphant/Stompbox.git
cd Stompbox
# 2. Run the main setup
bash scripts/setup/setup-stompbox.sh
# 3. (Optional) Configure WiFi with hotspot fallback
bash scripts/setup/setup-hotspot.sh
# 4. Reboot to apply all changes
sudo reboot
# Stompbox will start automatically on boot- Raspberry Pi 4 (4GB+ RAM) or Raspberry Pi 5 (8GB recommended)
- USB Audio Interface (low-latency recommended, tested with various interfaces)
- MIDI Controller (optional, auto-connected if present)
- Power Supply - 5V/3A minimum for Pi 4, 5V/5A for Pi 5
- Raspberry Pi OS 64-bit (Bookworm recommended)
- Fresh installation or previous setup cleanup
- Network connectivity (for package installation)
- SSH access enabled (or physical access for testing)
- JACK 2 - Professional audio server with real-time priority
- a2jmidid - ALSA to JACK MIDI bridge (auto-connects controllers)
- Real-time kernel parameters for stable audio at low latency
- Real-time user permissions - Audio group with RT capabilities
- Console auto-login - Automatic boot to desktop
- Systemd service - Auto-start Stompbox on boot with restart on crash
- PipeWire/PulseAudio disabled - Prevents audio conflicts
- NetworkManager hotspot creation
- Automatic fallback - WiFi when available, hotspot as fallback
- Default hotspot - SSID:
pistomp, Password:pistomp00
bash setup-stompbox.shWhat this does:
- ✅ Verifies prerequisites (not running as root, build exists)
- ✅ Configures console auto-login
- ✅ Installs JACK2 and a2jmidid packages
- ✅ Sets real-time priority limits for audio group
- ✅ Disables PipeWire/PulseAudio conflicts
- ✅ Detects USB audio card
- ✅ Creates Stompbox folders (Presets, NAM, Cabinets, etc.)
- ✅ Configures systemd service for auto-start
- ✅ Offers immediate startup test
Output: Color-coded feedback with clear section headers
bash setup-hotspot.shWhat this does:
- ✅ Validates NetworkManager is installed and active
- ✅ Creates hotspot connection (WiFi Access Point mode)
- ✅ Assigns high priority to existing WiFi networks
- ✅ Creates fallback service to activate hotspot if WiFi unavailable
- ✅ Enables systemd service to run at boot
Boot behavior:
- Pi attempts WiFi connection (20 second wait)
- If successful: connects to known network
- If timeout: automatically activates hotspot
- Manual override available any time
sudo rebootStompbox will auto-start on boot. Verify:
sudo systemctl status stompbox
journalctl -u stompbox -f # Real-time logs
jack_lsp # Check JACK portsEdit the JACK parameters in start-stompbox.sh or the systemd service:
# Current (balanced):
jackd -R -P 80 -d alsa -d hw:$CARD -r 48000 -p 256 -n 2
# ~10.7ms latency at 48kHz, stable
# Lower latency (higher CPU):
-p 128 -n 2 # ~5.3ms, requires 50%+ CPU
-p 64 -n 2 # ~2.7ms, may be unstable
# Higher stability (higher latency):
-p 512 -n 2 # ~21.3ms, very stable# Change SSID
nmcli connection modify Hotspot 802-11-wireless.ssid "NewName"
# Change password
nmcli connection modify Hotspot wifi-sec.psk "NewPassword"
# Change channel (1-11 for 2.4GHz)
nmcli connection modify Hotspot 802-11-wireless.channel 11# Activate hotspot
nmcli connection up Hotspot
# Return to WiFi
nmcli connection up "YourWiFiName"
# View all connections
nmcli connection show
# View connection status
nmcli device statusAutomatic on boot, but manually connect additional controllers:
# List all MIDI ports
jack_lsp | grep midi
# Manually connect a device
jack_connect "a2j:device capture" "stompbox:midi_in"# Check system audio cards
cat /proc/asound/cards
# Verify USB card is present
lsusb | grep -i audio
# Manual JACK test (without scripts):
jackd -R -P 80 -d alsa -d hw:0 -r 48000 -p 256 -n 2# Check a2jmidid is running
pgrep a2jmidid
# Restart MIDI bridge manually
killall a2jmidid 2>/dev/null || true
a2jmidid -e &
sleep 2
jack_lsp | grep a2j# Check wifi-fallback service
systemctl status wifi-fallback
# View fallback logs
journalctl -u wifi-fallback -n 50
# Check NetworkManager
nmcli device status
# Manual hotspot test
nmcli connection up Hotspot# Check JACK status and CPU
jack_cpu_load
jack_server_control
# View real-time limits
cat /proc/`pidof stompbox-jack`/limits | grep RTPRIO
# Increase latency for stability
# (Edit jackd parameters, see Configuration section above)# Verify audio group membership
groups $USER
# If not in audio group, add user (requires reboot):
sudo usermod -a -G audio $USER
# Check real-time limits
cat /etc/security/limits.d/audio.conf# Start/stop/restart
sudo systemctl start stompbox
sudo systemctl stop stompbox
sudo systemctl restart stompbox
# Check status
sudo systemctl status stompbox
# View logs
journalctl -u stompbox # All logs
journalctl -u stompbox -f # Real-time (like tail -f)
journalctl -u stompbox -n 100 # Last 100 lines
# Auto-start management
sudo systemctl enable stompbox # Enable at boot
sudo systemctl disable stompbox # Disable auto-start
# Test without systemd (direct script)
bash /home/[username]/start-stompbox.sh| Device | Tested | Notes |
|---|---|---|
| Raspberry Pi 5 | ✅ | Excellent performance |
| Raspberry Pi 4 (8GB) | ✅ | Good, may need higher latency |
| Raspberry Pi 4 (4GB) | Works but marginal headroom | |
| USB Audio Interfaces | ✅ | Most major brands |
- Arm32 (32-bit OS): Scripts target 64-bit. 32-bit requires adjustment
- Non-USB audio: Currently requires USB card (HDMI audio needs custom config)
- WiFi range: Hotspot has limited range (~10m in obstacles)
- Simultaneous audio: JACK exclusive mode, can't mix with other audio servers
- Stompbox - Main Stompbox project
- JACK Audio - Professional audio server
- Neural Amp Modeler - Amp modeling engine