This post aims at showing new Pd users how to build a first patch that can be used as a real-time effect for the electric guitar (actually for just about any instrument). I will first show you how to create objects in a blank Pd patch. Then we’ll make a simple delay effect for the guitar (you can listen to a sample at the end of this post). It is aimed at people who have NEVER used Pd before. Anyone with a basic knowledge of Pd should move on to the next post.
Once you have installed Pd, you should see the following window on launching it :
Click on “File” –> “New” to open a blank patch. A blank window pops up :
Click on “Put” to view a list of objects that you can use to build a patch.If you click on vslider for instance, a vertical slider appears in the patch.
The most useful object in the picture above is the one in the upper left corner with a red line around. It is a generic object, which can be used to create any object in Pd’s libraries.
You can create a [adc~] object by clicking in this generic object box and typing “adc~”. “Adc” means Analog-to-Digital Converter : this object capture the incoming audio data from your soundcard. The tilda (“~”) is shared by most “audio” objects in pd. It simply means that this object takes audio signals as inputs and/or outputs.
Now that you know how to create virtually any object in Pd, you can delete all the objects in our patch but [adc~] (we’ll use it to create the delay effect). To delete an object, just click on it and press Delete. You can select more than one object by clicking somewhere in the patch and dragging the mouse : a rectangle should appear that highlights (selects) every object it covers.
Let’s stop a few seconds to explain how objects in Pd work together. There are two types of objects : the “audio” objects and the “control” objects. The first process audio signals, whereas the later deal with all the rest (numbers, symbols, lists, etc.). In order to create a patch, objects must be connected together by “cords”. You must click one outlet of an object and drag the mouse to the input of another object to connect them together (they’re only connected if you can see the cord). Please note that audio inlets and outlets are represented by a grey rectangle, while control inlets and outlets are empty rectangles. You must connect audio outlets with audio inlets.
Below is a picture of the finished patch to get a delay effect for the guitar. It is a good idea to start by copying patches in Pd off a picture of a working patch (like those in the FLOSS manuals). I encourage you to copy this patch “by hand” in order to get familiar with the creation of objects and connecting them together.
In the picture above, the path of the audio signal follows the green arrows (the one to the right means that we feed the output of the delay line back into its input to get a repeating delay effect, like an echo). If you try to copy this patch into a blank patch in Pd, you have to only copy the objects and cords (the arrows and comments were added by myself in Gimp 🙂 ).
The above patch will work with any sound source, either a guitar plugged in the soundcard or a voice through a microphone. You can try it easily (without using JACK, and even without an external soundcard) by plugging your guitar or a microphone into your laptop (or by using the internal mic). Just turn the audio on by clicking on “Media” –> “Audio ON”, and enjoy your first effect created with Pure Data!
- Simple delay for guitar using Pd for dummies (really, you should try and build the patch yourself!) : download the patch here.
- Listen to a sample :