# (resolved) How to implement this simple waveguide model? :)

I am trying to implement a simple waveguide synthesis model described here:

Quite simply it’s a pair of filtered delay loops with basic bridge coupling and damping modeled in the middle section by summing the outputs of the delay loops, applying Hb(z) to this and subtracting this result from each of the filtered loops.

This bridge operation is given in Laplace as:

In my case, Hb(s) works out to a simple frequency independent constant, say of 0.03.

How do I then calculate vb(z)? I can add the outputs of the two feedback loops easily enough. But what constant do I then multiply them by? Doesn’t this need to take into account sample rate somehow? Because if I double the sample rate, won’t I be subtracting from the feedback loops twice as often?

I apologize for asking here, as I know this isn’t specifically a JUCE question, but I tried twice on StackExchange and once on KVR and no one seems to be able to offer me an explanation. I know people here are very knowledgeable about DSP and helpful, and I think this is a pretty simple question so I’m hoping someone here can maybe help me out.

Thanks

Well I figured it out. I don’t know why, but it’s somehow sample rate independent. If I just multiply the multiplier by the summed samples and subtract it from each delay line it works perfectly and sample rate changes don’t affect the damping or sound.

Never mind. Just ignore me.

The delay lines probably are (except that you set them in smaples, could be set in any time measure I guess), but the LPF-s are not sample independent, if I’m not mistaken…

Yeah, I’m not even using delay lines. I am actually using resonant bandpasses instead of the delay line LPF system, but the principle is the same. What was interesting to me is that if you take a percent of the output from the bandpass (or delay loop) and then subtract that from the input of the bandpass (or delay loop) to damp the system progressively over time, this damping mechanism is sample rate independent. Ie. If you are subtracting (0.03*output) from the input at every sample it will damp at the same rate at 11 kHz sampling as it will at 192 kHz. ie. It will sound identical at both sample rates. I’m sure there’s some mathematical reason this works but it doesn’t matter except curiosity at this point. If it works it works.

1 Like