Guitar Effects using a Raspberry Pi
By: Henry Burgess
Tags: Raspberry Pi, Guitar, Guitar Effects

Step 1: Setup your Raspberry Pi

The first important step is to ensure that your microSD card gets an OS installed on it. I recommend using the Raspberry Pi Imager tool that can be found from their official website here: https://www.raspberrypi.org/software/

I installed the most recent version of Raspberry Pi OS, a port of Debian. This is maintained well and comes with a standard desktop.

The “Choose OS” option in the Raspberry Pi Imager tool gives many great OS options for different project types.

After installing the OS to the microSD, the Raspberry Pi can be connected to power and booted up. After configuring settings and updating software, your Raspberry Pi should be good to go:

The initial desktop presented after the Raspberry Pi has been setup and connected to the internet.

Step 2: Setup your USB audio

Audio-Technica ATR2x-USB USB DAC plugged into a USB port of the Raspberry PI.

This step is the most problem-prone, so don’t be dissuaded if a bit of trouble-shooting is required to get this working out of the box.

The USB DAC should be plugged into one of the free USB ports on the Raspberry Pi, shown in the image on the left. This DAC has two jacks: audio in (mic), audio out (headphone).

We will be setting this DAC up such that guitar input will be sent via the mic audio input, and output will be sent via the headphone audio output on the DAC.

The next part of this step involves some configuration in the software of the Raspberry Pi in order to set the USB DAC to be the default audio card, succeeding the onboard 3.5 mm jack on the side of the board.

The first thing you want to do is to check that your USB DAC has been recognised by your Raspberry Pi. To do this, you will need to open up a Terminal and enter the following commands:

aplay -l : This command lists all of the audio devices associated with the Raspberry Pi that are capable of audio playback.

Output of the first command enumerating all audio playback devices.

The output of this command is shown on the left. If all is well, you should see your USB audio listed usually as the second or third “card”, my USB audio card in this case is card 2.

This may be different for you, so make sure you double check what card number this is.

Make a note of your card number as you will need it later on in order to set it as the default audio card.

arecord -l : This command lists all of the audio devices associated with the Raspberry Pi that are capable of audio capture. This is will handle the input from your guitar.

Output of the second command enumerating all audio capture devices.

The output of this command is shown on the left. If all is well, you should see your USB audio card as the only listed device.

The number of this card should be the same as the number you made note of after running aplay -l .

Next, we need to edit a configuration file that controls the ALSA audio drivers running on the Raspberry Pi. This will tell the Raspberry Pi what the default audio card will be.

Run the command sudo nano /usr/share/alsa/alsa.conf in your Terminal instance, you may have to enter your user account password first. You will be presented with a view like this:

Contents of alsa.conf in nano.

Next, you want to scroll down a bit further in the file (using “up” and “down” arrows) until you reach the following lines:

The section of alsa.conf used to set defaults.

The lines of interest here are defaults.ctl.card 0 and defaults.pcm.card 0 . The 0 at the end of the lines refer to the card number that is acting as the default audio card.

Given that we know we want a specific card to act as the default audio card (in my case it was 2, use the number you noted before), this is the number that we want to put at the end of these two lines.

The lines should now read defaults.ctl.card # and defaults.pcm.card # replacing # with your card number. An example for a card number of 2 is below:

Changes made to the alsa.conf file to set the default audio card.

To exit this view, press CTRL + x , y , then ENTER .

Reboot your Raspberry Pi, and you can now move on to configuring the effects software.

Step 3: Install effects software

I used the free and open-source Guitarix software package in my project. There are other alternatives such as Rakarrack, but I haven’t looked into them yet!

If you navigate to the Add / Remove Software menu item under Preferences when you click the Raspberry Pi logo in the top left, you should be presented with a dialog box like the following:

Using the top-left search box, search for guitarix .

The guitarix package listed in the search results.

Select the checkbox next to the package with version similar to guitarix-0.xx.x-x and click the “Apply” button in the bottom-right of the window. You will be prompted for your password before the software is then installed.

After the software has installed, Guitarix should appear in the Raspberry Pi menu under the Sound & Video category. Click the option to start Guitarix.

You will most likely be presented with this window, click “Start Jack” to continue.

You should see two windows open up: JACK Audio Connection Kit and Guitarix.