Bidirectional Digital Waveguide.

daveronan's icon

Hi guys,

Could someone tell me if I am doing this correctly. I'm trying to make a bidirectional digital waveguide. My overall goal is to try and physically model the sitar. I am also trying to figure out how to make a dynamically changing delay length so as to model the sitar bridge. Any help would be greatly appreciated.

752.BiDirectionalDelay.maxpat
Max Patch
daveronan's icon

anyone?

oli larkin's icon

i'm not familiar with exactly the approach you are trying to take (are you following a paper?). You have some problems with the tuning. Firstly you want to send a signal to tapout~ in order to get a delay of a fractional number of samples. Secondly, i would recommend running the part of your patch that features a feedback loop inside a poly~ so that you can lower the signal vector size. Otherwise you will find that you can't play high notes.

Here is a karplus strong patch which shows these things:

oli

www.olilarkin.co.uk

772.karplus.zip
zip
brendan mccloskey's icon

@ daveronan

here's an early incarnation of a string model of mine, which underlines everything oli says in his response;

@ oli larkin

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

without wishing to hijack the original topic, can you elaborate on your remarks re poly~ allowing lower vector sizes in this context; i too have found that tuning in the upper register becomes problematic.

oli larkin's icon

with a tapin~ / tapout~ feedback loop, the delay time can't go lower than the signal vector size. This means the highest pitch you can produce is limited by the vector size... for sr 44.1 , sigvs 512 the highest pitch is

44100./512 =86.13hz

or for sigvs 32 the highest pitch is

44100./32 = 1378.125hz

so a sigvs of 8 is probably good, which gives you up to 5512.5hz

you can set this with an argument to poly~ ... vs 8 for example, which will run the contents of your poly patch at the lower vector size.

hope that helps,

oli

Roman Thilenius's icon

the shorter vectorsize simply allows tapout to make use of shorter delay times thats all about it.

but then there is teeth~.

brendan mccloskey's icon

Thanks oli, this couldn't be any clearer, and solves my tuning issues - I can't recall exactly where, but i remember reading in related literature that higher-register tuning is problematic in string modelling and impulse response systems anyway

daveronan's icon

Hi guys,

Thanks for taking the time to get back to me. I have spent a lot more time on my model and I am starting to get results. I have taken everything that ye have said into account but I am still unsure if I have correctly implemented a bi-directional digital waveguide. I think I may be close though.

I am taking this model from a paper by Matti Karjalainen and Vesa Valimaki. The title of the paper is "Plucked-String Models: From the Karplus-Strong Algorithm to Digital Waveguides and Beyond". I am trying to implement the plucked string with bridge output model.

If any of you could shed some more light on the subject it would be much appreciated. The two updated files are attached.

833.Bidirectional_Digital_Waveguide.zip
zip
daveronan's icon

Apologies! I posted the wrong file! Please find the correct one attached,

834.Bidirectional_Delay_Line.zip
zip