A reader has been asking me to put this patch online for a while now, so here it is : some kind of polyphonic synthesizer for electric guitar! It doesn’t require any midi pickup or any particular hardware, except a guitar, a sound card and a computer running Pure Data. All the magic happens thanks to the phase vocoding technique. The result is a sound that resembles that of an electric organ. You can also get a sound that could fit into a Boards of Canada track if you set the tremolo speed really slow.
A phase vocoder allows you to control the speed and pitch of a recorded sound independently. A famous application of it is for time-stretching. I encourage you to study Miller Puckette’s phase vocoder example in Pd’s audio examples (I07.phase.vocoder.pd).
My patch is largely based on this example for all the fft analysis and playback. The way it works is quite simple. A short sample of the incoming sound is recorded everytime the strings are plucked (that is, when the input is found to be higher than a sensitivity threshold). It is then played back with a speed of 0 (infinitely time-stretched). The pitch is either left unchanged, or made to oscillate around its initial value to get a tremolo effect.
You may have to adjust the sensitivity depending on your guitar and on the strength of your playing. The lower the sensitivity, the higher the chances that Pd will think the strings have been plucked when they have not (changing the pickup or turning a noisy volume button can cause this behaviour).
Also, you have to understand that the sound is actually synthesized within Pd. Once a sample is recorded, you can’t control the playback with your guitar (volume, vibrato…). All you can do is play another note or chord that Pd will record and playback.
Finally, the portamento thing is quite fun with chords, but still very experimental and not very reliable at all…
You can get the patch here.
Here’s a sound sample.