[sdiy] karplus-strong drum synthesis

Joel B onephatcat at earthlink.net
Sat Aug 20 22:02:29 CEST 2011


While we are discussing algorithms, I'm attempting to figure out how to write a karplus-strong drum synth function, the one on page 46 of this document:

http://www.eumus.edu.uy/eme/cursos/dsp/material/karplus-strong/Karplus-Strong_Digital.Synthesis.of.Plucked-String.and.Drum.Timbres.pdf


I'm trying to figure out how to write this, looks like I need to start with a wavetable of random numbers and somehow process it like this:

y[ sample ] = ( y[ sample-p ] - y [ sample - p - 1 ] ) * blend - rnd(0) 

where rnd(0) gives me random numbers less than one.

p is supposed to be the output pitch if I understand correctly.

Assuming i'm even a little bit right about this, the question is, if I start at sample 0, there is no sample - 1 to use in the equation, so how is that the condition handled? Do you wrap to the last sample at t the end of the wavetable?

 - Joel


More information about the Synth-diy mailing list