Battery powered Raspberry Pi Zero effects system

I wanted to research a Raspberry Pi powered effects system for a guitar or synthesizer. I wanted to create cheap guitar effects pedals, or an entire amp simulator. I originally built the system using regular Pure Data on my Raspberry Pi 3, and I thought it would be AC-powered. Once I got thinking about it, I thought the guitar DSP I built may be able to run on a Raspberry Pi Zero and be battery powered. The main differences between the Pi 3 and the Pi Zero is the price and processing power. The Pi 3 is a Quad core processor and costs $40, while the Pi Zero is a Single core processor and costs $5. Once I brought the Pure Data code over to the Pi Zero, I had some initial issues. The first issue was with latency, so I learned about running pure data on a headless system. Inside of raspi-config, you can set a setting that does not load/use resources on the GUI and just runs a terminal. This saved a fair bit of cpu processing for the Pi Zero. Then I also ran Pure Data in something called headless mode with the -nogui flag. In order to get my external USB audio card to run, and Pure Data to launch on startup I wrote a bash script, and called it in /etc/profile. The script ran “pd -nogui /home/pi/Desktop/Guitar_Pi.pd &” which launches Pure Data in no GUI mode and loads the patch on the desktop, and the “&” flag lets the OS keep running Pure Data in the background. With this script/system in place you can plug in the Pi Zero to the USB battery, and it will just start processing low latency audio without any user interaction/ssh.

In musical terms, I built an initial gain system, a WhaWha effect, a Fuzz/Distortion effect, then Reverb from rev3~. Then there is a load bang that auto-starts the DSP in Pure Data. I used mostly FLOSS manuals and the internet to help me build the effects. ( https://booki.flossmanuals.net/_booki/pure-data/pure-data.pdf ) In the future I would like to build a small MIDI controller from a Teensy that would give small knobs and buttons to change parameters of the effects. The effects used were time domain signal processing effects. I would be interested in doing some FFT processing on audio and seeing if I can keep the audio latency still relatively low. I think it would be really interesting to build a master effects “backpack” for small battery powered synthesizers like the Pocket Operator. Or possibly an open source cheap synthesizer using only the Pi zero, and a custom MIDI controller.

Here is a picture of the system while being hooked up to a Pocket Operator synthesizer:

Here is the Pure Data text code: