Pdialyte Effects Pedal
I designed and manufactured a guitar pedal with customizable effects. Anyone with background in MAX/MSP or Pure Data (Pd) can create sound effects for this platform. Pedal runs Pd on a Jetson Nano. All DSP is done in software at low latency (~8ms). Pedal works with any quarter inch instrument/mic. I made this platform cheap, open source, and intuitive so hopefully other musician/engineers would contribute to a shared library of unique and creative sound effects.
Motivation
My preferred niche of music is anything with abnormal sounds. As a guitarist, this resulted in me blowing unacceptable amounts of money on effect pedals. In a traditional guitar pedal, all the signal processing is done in a circuit. This is outdated. A few years ago, I was introduced to MAX/MSP. MAX made me realize anyone with a computer has access to unlimted sound effects. Recently, I started working with Pure Data (Pd). Pd is a free and open source visual programming language for signal processing. Though the interface is not as pretty as MAX, Pd serves the same purpose and can run on Linux-based embedded systems. This compelled me to build a stompbox effects pedal in which the user can easily create an upload their own sound effects.
System Architecture
First Iteration
Figure 1. First iteration of Pdialyte. The stomp button turned the effect on/off. The LCD touchscreen displayed all effect parameters. The potentiometer vaired the selected parameter. All sensors were connected to the Arduino serially sent the information the Pd running on the Nano. The user connected their instrument to an audio interface plugged into the Nano. This sent the audio signal through Pd, then out their speaker.
There were many faults to this system. First the touchscreen was cheap, barely responsive, and used countless GPIO pins. The potentiometer could not rotate continuously. Multiple microcontrollers complicated wire management and physical design. The serial protocol worked, but it was too intricate to expect less technical users to figure out. Lastly, the cost was not ideal. For this platform to be widely adopted, I knew I had to remove the Arduino.
Current Iteration
Figure 2. Current iteration of Pdialyte featuring a single microcontroller. The stomp button turns the effect on/off. The LCD displays all effect parameters. The encoder/button is used to navigate the menu. The user connects their instrument to an audio interface plugged into the Nano. This sends the audio signal through Pd, then out their speaker.
All the improvements in this iteration stemmed from the swapping the touchscreen with a simple 16x2 LCD. This allowed me to connect all peripherals to the Nano removing the Arduino. I wrote a Python script that reads/writes data from the peripherals. Using a TCP socket, Python is able to send data Pd using a simple protocol. Audio input/output remains unchanged in this iteration.
Physical Design
Figure 3. Pedal lid with all components annotated. Potentiometer is only used to control LCD contrast.
Figure 4. Isometric and back views of pedal. The back view shows all the ports on the Nano. When pedal is in use, only a power cable and usb cable are needed.
I tried to make the design as simple as possible. The pedal base is 3D printed, and the pedal lid is laser cut. You can find the CAD models here. The following is a bill of materials, so you can make your own.
Primary Materials
• x1 Jetson Nano
- $99
• x1 I2C Rotary Encoder
- $22.95
• x1 16x2 LCD
- $7.50
• x1 10k Panel Mount Potentiometer
- $4.49
• x1 Stomp Button
- $5.99
Total: $139.93
Miscellaneous Materials
• 3D Printing Filament
• Acrylic
• x6 #4 Machine Screws and Nuts
• x4 #6 Machine Screws and Nuts
• x4 M2 Machine Screws and Nuts
• Jumper Wires
• x1 1k Resistor
• Bumpers
Creating Sound Effects
One of my primary goals in this project was to make it as easy as possible to develop sound effects for this platform.
Each sound effect requires 2 files, a Pd patch and a Python script.
The Python script essentially writes itself so you only need to make the Pd patch. Let me explain.
Pure Data Patch
Figure 5. Pitch shifter Pd patch for Pdialyte demostrated in this video.
In figure 5, everything highlighted in orange was taken from Pd example G09 by Miller Puckette.
The only addition I made was the wet/dry mix.
Everything else highlighted in blue and green make this example patch work with my platform.
The green part recieves and routes information from Python. This allows you to control various effect parameters.
The blue part turns the effect on/off when you press the stomp button on the pedal.
Python Script
The Python scipt to make the pitch shifter work is lengthy. You can view it here.
However to make a new sound effect, you can copy and paste the entire script.
These are the only lines of code you will need to modify:
#Make controls
control1 = control(title="Transposition", low_lim=-24, high_lim=24, unit="1/2 steps", value=0)
control2 = control(title="Window", low_lim=0, high_lim=2000, unit="ms", value=100)
control3 = control(title="Delay", low_lim=0, high_lim=5000, unit="ms", value=0)
control4 = control(title="Wet", low_lim=0, high_lim=100, unit="%", value=50)
control5 = control(title="Resolution", low_lim=0, high_lim=0, unit="", value=1)
controls = [control1, control2, control3, control4, control5] #resolution should always be last in list
These lines of code initialize the sound effect's controls. Your effect can have any number of controls. In this example, the control with title "Transposition" controls the change in pitch in units of half steps. The lower limit is -24 which is two octaves below the input signal. The upper limit is 24 which is two octaves above the input signal. Replace these lines of the code with a control name, lower limit, upper limit, unit (if any), and initializing value respectively. Leave the resolution control unchanged and last in the controls list. The resolution control changes the effect of a single encoder tick. If the resolution is set to 10, a single encoder tick will increment a control value by +/- 10.
Future Work
This will be an ongoing project for the foreseeable future. Here is what to expect in future iterations.
• Raspberry Pi replacing Jetson Nano
• Use of JACK Audio Connection Kit to further reduce latency
• PCB for all electronics
• Button(s) to save/recall effect configurations
• Chaining multiple sound effects together in a single pedal
• Variable control increments based on encoder angular velcity
Acknowledgements
Professor Stephan Moore for project guidance.
Professor Ben Sutherland for introducing me to the world of DSP.
Miller Puckette for creating Pd.
Jen Wu for listening to me ramble about guitar pedals.
Pierre Massat for his similar work, Guitar Extended.
If you happen to come across this post, please reach out to me.