Forums > MaxMSP

Karplus-Strong extension – drum synthesis algorithm

December 22, 2009 | 11:32 am

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.

Here is my attempt -

– Pasted Max Patch, click to expand. –

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


December 22, 2009 | 1:12 pm

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?


December 22, 2009 | 1:14 pm

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


December 22, 2009 | 1:53 pm

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:

– Pasted Max Patch, click to expand. –

December 22, 2009 | 2:11 pm

PeRColate: http://music.columbia.edu/PeRColate/
rtcmix~: http://rtcmix.org/rtcmix~/index.html
chuck~: http://music.columbia.edu/~brad/chuck~/index.html
sc3~: http://music.columbia.edu/~brad/sc3~/index.html
csound~: http://www.davixology.com/csound~.html

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.

brad

http://music.columbia.edu/~brad


December 22, 2009 | 2:18 pm

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:

– Pasted Max Patch, click to expand. –

main patch:

– Pasted Max Patch, click to expand. –

December 22, 2009 | 2:22 pm

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.


December 22, 2009 | 4:13 pm

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


December 22, 2009 | 4:44 pm

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.

brad

http://music.columbia.edu/~brad


December 22, 2009 | 6:51 pm

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


January 3, 2010 | 3:10 pm

here’s my attempt, maybe you want to give it a go:
http://cycling74.com/forums/topic.php?id=23750


Viewing 11 posts - 1 through 11 (of 11 total)