Sunday, 28 February 2010

Karplus-Strong guitar string synthesis with Pure Data

Presented here is a Pure Data patch that generates, without samples, a fairly decent acoustic guitar sound. This uses the Karplus Strong algorithm, in which an initial noise burst is fed into a tuned delay line (a delay line whose length equals the period of the desired frequency). The string's vibration is damped by a lowpass filter in the delay's feedback line.


The synth is built from six instances of this karpluck~ abstraction, one instance representing a single string. Each is synthesized in complete isolation: in this simple model there is no sympathetic resonance crossover between the strings.

Patch articulation comes from a simple strummer sub-patch. This generates a random sequence of chords in a pattern typical of an acoustic guitar player. A very small latency (strum_speed) emulates the short time delay between each string being plucked as the plectrum moves across all six strings. Width effects the width of the initial noise burst, with higher widths producing a brighter sound. Decay and cutoff set the amount of attenuation and filtering, respectively, in the delay feedback.

Here is the patch in action:


Download the patch for Pure Data here.

3 comments:

  1. wow well done! I'm building one similar to this to be used with a PS3 rockband controller. Mine sounds more like a bass and only plays one string at a time (I want to see how you do your strum delay) but I added a throttled comb filter for distortion...sounds pretty wild.

    ReplyDelete
  2. The synth is built from six instances of this karpluck~ abstraction, one instance representing a single string. Each is synthesized in complete isolation: in this simple model there is no sympathetic resonance crossover between the strings. Chris

    ReplyDelete