a more advanced guitar sound

My previous guitar patch is decent, but Karplus-Strong modeling is actually pretty simplistic. So I read a bit more about waveguide synthesis and came up with this patch, based on my limited understanding of waveguides.

Here there are two recirculating delay lines per string: one for each axis (vertical and horizontal) of oscillation, with various levels of energy transfer between them and the body. There are also six different "strings" here, and the pluck for each one sounds slightly different. I also added a feature to offset the frequencies of the two axes of oscillation from each other (much like a kantele). So if you set it to 1.01, one of the delay lines will be set at the period of the note * 1.01, and the other will be the period / 1.01.

Changing the pick angle will change the amount of audio sent to the horizontal and vertical delays. But because of cancellation issues, I had to take the absolute value of the sine and cosine functions to preserve the magnitude of each component of the vector while discarding negative polarity.

I got the bandpass frequencies and Q for the body resonance from The Physics of Musical Instruments, by Fletcher and Rossing, pp. 252-254. Some artistic license was taken.

Right now it's set up for strumming, so you can sequence a series of chord messages (see the patch for examples). These messages refer to the MIDI note being played on each string, from low to high. "x" means mute a string, and "p" means keep the string fretted to the previous note played on it (in order to sustain that note, or allow the string to vibrate sympathetically). I set the initial delay times to standard tuning. You can try editing the innards to make it use fret numbers like a tablature (e.g. 0 2 2 1 0 0) if you prefer that way.

So anyway, here's the patch. Some of the innards are a bit messy. Sorry about that.

Sound samples (an excerpt of the Who's "A Quick One While He's Away," with percussion just for the hell of it): ogg mp3

Some other stuff you might try:

-Make an electric guitar with amp feedback.

-Make a strumming module that can strum up or down. Right now mine only strums upwards. I can't just use a [sort] and switch between 1 and -1, because the different strings have different pluck timbres.

-MIDI keyboard compatibility -- assigning notes to strings could be quite difficult.

-You could also add hammer-ons and pull-offs by changing the delay times without plucking.

-Try building vibrato and portamento (simulating string bending or using a slide or whatever). You'd have to change the [delread~] objects in the string modules to [vd~].

I've also heard that you can make the instrument more computationally efficient by commuting the body response to the impulse, but I'm not sure exactly how this is supposed to work. If anyone knows, feel free to .

I also made a bass along the same lines. This patch is monophonic, notwithstanding the fact that real basses have four strings. Two alternating lowpass filter cutoff values at the pluck give the impression of alternating up and down strokes, or alternating fingers.

Sound samples: ogg mp3