a simple guitar sound

This patch is based on Karplus-Strong synthesis. The G04.control.blocksize.pd patch in Pd's audio examples directory is a pretty straightforward example of the algorithm. This one is more complicated, and includes a noise impulse, body resonance formants, and a comb filter to simulate the effect of plucking at various places along the string.

Sound samples: ogg mp3

The drawback to including a set of formants is that you have to test the patch carefully to make sure there are no notes that feed back. It takes a bit of finetuning to find bandpass frequencies that sound good and give a (relatively) even frequency response.

Here's the same instrument with different formants, so it becomes a bass:

(The two screenshots on this page look different because I updated pd-extended in between taking them.)
Sound samples: ogg mp3

EDIT (April 2012): See here for more issues and notes regarding this patch, since I'm too lazy to edit it at the moment.