Karplus-Strong extension - drum synthesis algorithm

dondelion's icon

Has anyone implemented this karplus-strong drum synthesis algorithm using only max/msp objects?

From Computer Music Tutorial p295 -

X(t) =    { + 1/2 (X(t-p) + X(t-p+1)) with probability b
    { - 1/2 (X(t-p) + X(t-p+1)) with probability 1-b

When b=1 the modifier is a lowpass filter and when b=0 the signal is negated every p+0.5 samples.

Max Patch
Copy patch and select New From Clipboard in Max.

Here is my attempt -

It's not quite right - it's possibly working at b=0 and b=1 but not in between. It definitely doesn't sound like a drum at b=0.5 Any ideas?

Thanks,

Don

AudioMatt's icon

In my experience, these sort of physical modeling algorithms don't work in max... ever. They require sub-vector-size delay times which aren't possible in max.

I'm really interested in that sort of thing though. I might be able to help with an mxj version. Where did you find that algorithm?

AudioMatt's icon

more specifically, using send and receive delays your signal by "signal vector size" in DSP setup.

Danny de Graan's icon

You can do physical modelling in max...no problem. I do it for years. I even build clarinets, fluits, metal plates e.a.

This is the basic model I use a lot:

Max Patch
Copy patch and select New From Clipboard in Max.

Brad Garton's icon

All the above have rather extensive phys-model capabilities, and they're all free.

By the way, the 'drum' extension of the K-S algorithm, if I recall, sounds really pathetic.

oli larkin's icon

more specifically, using send and receive delays your signal by "signal vector size" in DSP setup.

in this case poly~ is your friend: use it to set a low sigvs

here is a KS patch with a drum mode, although i don't have the blend factor control

save as comb.poly.maxpat:

Max Patch
Copy patch and select New From Clipboard in Max.

main patch:

Max Patch
Copy patch and select New From Clipboard in Max.

dondelion's icon

Danny,

Unfortunately I'm at work now so can't check your patch. Quite interested in your other models though especially the metal plate if it's made solely using native objects and no externals. Any chance of a peek?

Brad,

Thanks for the links but I'm trying to get my head around the theory and would prefer to make my own PM bits.

Audiomatt,

Stick everything in a poly and you can use single sample vector sizes.

Danny de Graan's icon

Hi Brad,

The metalplate patch I build it's for 2 compositions I'm working on. In essence, it's a series of 20 string algorithms I posted above with different exiters (white, pink noise, rand e.a.) and filtering. Each string I can control the delay time, gain and filtering. I use multisliders for this. The sum of this is mixed and send true a amplifier with an envelop controller. It is completely made with native objects which I prefer. Also, you can set the whole patch in a poly~ and change the vectorsize and samplerate so you get a wider range of pitches you can play.

It's a big patch where I use a lot of my own objects/patches so its rather difficult to post the patch. However, If you like I can help you build one from the example I posted earlier?! Maybe, next week, I can try to strip the patch of my onw objects. At the moment I'm rather tiered since I had to travel for 36 hours because the airport in Holland was closed and I was in London for the weekend. Send me an email when you need any help.

Danny

Brad Garton's icon

Danny --

NIce patch, and amazing you can think it through using 'native' max/msp objects.

Thanks for the offer of help, but I believe I'm ok with phys-models.

Danny de Graan's icon

Hi Brad,

Sorry for the mixup. I tried to address Dondelion. I thought he was Brad.

However, my offer still stands. And thanx for the compliment.

Danny

texugo's icon