I’ve been trying to make a simple looper with Pd for quite a while but I couldn’t find anything interesting on the web. It turns out that it is actually pretty simple to make one with Pure Data. It doesn’t require any fancy technique and it even works perfectly fine on a Raspberry Pi with a low latency.
Loopers were originally made with a piece of tape with both ends attached together so that it was playing continuously and repeatedly. By varying the length of the tape, one could get loops of different durations. Many layers of sound could be recorded on the same loop and result in rich, complex and sometimes eerie sounds. A very good example of what can be done musically with loops is the work of Brian Eno and Robert Fripp (on the album Evening Star, for instance). Loopers were the basis of Fripp’s Frippertronics. Another inspiration for me to use a looper is the French singer Camille, who does interesting stuff on stage with a digital device. Looping is also sometimes called “sound on sound”.
The basis of the patch i’ve made is quite simple. The tape loop is replaced by a table in Pd, which is played continuously (that is, repeatedly). While this table is being played, the output and the input (from a microphone or a guitar) is also written to it. If there is no input (nothing is being recorded), the loop is being copied on itself (no changes). If there is some input, it gets added to the sounds that were already there in the loop. (There is an even simpler way to achieve this using a delay line with a feedback of 1, but you can’t empty it easily and loose other benefits of using tables in Pd).
There is one trick though. Pure Data processes the audio in blocks of samples (64 samples by default). Any audio event occuring during a block will only be taken into account at the beginning of the next block. The table’s length must thus be a multiple of the block size (64 in my patch), so that the end of the last block of the loop corresponds exactly to the beginning of the first block. If the table’s length is not a multiple of the block size, audible pops and clicks will appear while looping, and gradually turn into a very annoying noise if you record many layers. I have made a subpatch called [pd into-blocks] to take care of that.
There is nothing very special other than that. There is a subpatch to tap a new tempo, and i’ve added a limiter on both the input and the output to prevent audible distortion if you record too many layers. I’ve also added a “reverse” function that I find pretty cool, and you can also export your loop as a wav file if you’re very proud of it. You could of course use the recorded table in different ways, play it more slowly, etc.
Below is a quick example of what it sounds like (you can hear the different layers being recorded, the first one being reversed, and me playing on top of the loop).
The patch can be downloaded here.