Algorithms for modulated delay

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

I think this is just a resampling problem, pick your favorite technique. All you're doing is changing the playback rate of a recording.

Also, there is no output buffer. You produce a single sample at a time based on the contents of the input buffer. And the amount of pitch change has to do with the rate the delay time changes, not what the maximum or minimum delay time is. How *fast* does the user go from 20 seconds to 100 ms is the concern. If it's super fast it's going to shift pitch so high you can't hear it anyway. (And your resampling algorithm should filter it out.)

Post

Got it. Well, it's not ideal really. My main concerns would be zipper noise and CPU when downstretching, because it seems to me, that it could easily require far more CPU than stretching the delay line itself. It will probably depend on the delay line sizes and at some point one or the other technique will be better.
Vojtech
MeldaProduction MSoundFactory MDrummer MCompleteBundle The best plugins in the world :D

Post

Don't understand why you'd have zipper noise, that's usually due to sudden/infrequent changes in modulation. You'd presumably calculate your tap point for every sample so your modulation would be completely smooth. (And instantaneous change in delay time would pitch shift to infinity or zero, depending on if you're going longer or shorter, so you'd expect that to click. This is why choruses and flangers don't ever use square waves for modulation.)

Post

Hehe well, I even like square waves :D. But that's a bit extreme, but still... Choruses and flangers also use very very short delay lines, where just the interpolation is fine.
Vojtech
MeldaProduction MSoundFactory MDrummer MCompleteBundle The best plugins in the world :D

Post

Sorry but I'm not sure how to explain this any better. (Or maybe I don't understand what you want to achieve. Are there any existing devices or software that do whatever it is you want to do? If not, that's probably for a good reason.)

Post

i dont know exact what you mean, but on DSP are instructions for it, and delay is program in this way. A big enough ring buffer (is power of 2) and there is a read pointer and a write pointer to the ring buffer. the delay depend on the diffrence of read and to write pointer. reverbs are program same way on DSP. there are use several read pointers that read the data in ring buffer. A 50 MHZ DSP can calc 200 delay lines of reverb easy. and modulation can be done by change of read pointers in ring buffer
win 10 64 22H2 intel i5 8600K (6*3.6 GHZ) 32 GB Ram

Post

This is probably one of the most disturbing threads ever in this forum. :dog:

Melda, you have quite a lot of released plugins out there. Including delays, reverbs and rotary speakers. You probably know deep in your heart how modulating delays work. It's really not rocket science, no matter how long.

Post

SMH: MDelayMB, just tried it, square wave modulation to the delay line, zipper free. There's of course some pitched artifacts, the second derivative discontinuity on its own will do that, but sounds good to me.

magicmusic: That's straightforward of course, the problem is about quick modulation and how to make it "sound good", hence zipper-free etc.

hugoderwolf: hehe :D, you know there's always time to learn something new ;). Actually the interpolated delay is nearly ultimate, the audio quality is pretty much as high as it can get (assuming one wants the pitched response), it is also optimal when it comes to memory consumption, but the modulation takes quite some CPU. I'd like to sort of invent some more complex algorithm, that would improve that.
Vojtech
MeldaProduction MSoundFactory MDrummer MCompleteBundle The best plugins in the world :D

Post

MeldaProduction wrote:SMH: MDelayMB, just tried it, square wave modulation to the delay line, zipper free. There's of course some pitched artifacts, the second derivative discontinuity on its own will do that, but sounds good to me.
Huh? Square waves *are* zippers. (With only one "tooth".) If you modulate with a square wave (or any discontinuous waveform) you're not making a modulated delay so much as a stutter effect. You're just jumping from one time instantaneously to another. It's an edit/splice. You definitely shouldn't have pitch changes as only *continuous* modulation of the delay time causes that. (And when we do have pitch changes they're not "artifacts" so much as the intended effect of the modulation. "Artifact" typically means some left behind evidence of the process that's not the intended effect of the process.)

Have to agree with hugoderwolf, it's really weird that an established developer doesn't get this.

Post

MeldaProduction wrote:I'd like to sort of invent some more complex algorithm, that would improve that.
No, you're asking others to do it for you :wink:
hugoderwolf wrote:Melda, you have quite a lot of released plugins out there. Including delays, reverbs and rotary speakers. You probably know deep in your heart how modulating delays work.
SMH wrote:Have to agree with hugoderwolf, it's really weird that an established developer doesn't get this.
I thought you were kidding but he really released plugins before :eek: Never heard of Meldaproduction.

edit: ok after a quick look at their plugins I have to say it may be part of the fewer plugins he *really* develops by himself. :lol: :lol: :lol:

edit 2: could it be that you've deadlocked your thoughts for a very rare case of modulating which normally might not occure? If so, sounds like a waste of time.

Post

SMH, I get it of course, but that doesn't mean I'll stop trying to get it better. Just the fact, that it IS possible. Look at it this way - the classic interpolation gets you some basic modulated delay, but will zipper at quick or abrupt changes. What I proposed works well with your case AND it also works well for quick and abrupt changes. But it has completely different CPU requirements - lower in static mode, probably higher when modulated.
I think saying that "delays work like this", period, is soooo closeminded. Of course we can settle with the trivial algorithms, but if everyone would think like that there would be no advanced stuff like pitch shifting. Also as you know oversampling, various kinds of interpolations etc. are used to avoid zipper noise, so why would suddenly be attempting to avoid it wrong? ;)

BlueprintInc: Hehe nice try :D. Just check the plugins and you'll see what can be accomplished if you are not closeminded. But let me guess, you have 2 posts, so you are a competition trying doing some "negative advertisement", right? :D Busted :D
Vojtech
MeldaProduction MSoundFactory MDrummer MCompleteBundle The best plugins in the world :D

Post

MeldaProduction wrote:Look at it this way - the classic interpolation gets you some basic modulated delay, but will zipper at quick or abrupt changes.
No it won't, at least if done properly*. Won't even zipper with simplest linear interpolation.

If you want to avoid clicks/glitches/warping on transient delay time changes though, just crossfade between two taps.

* Doing a catch-all interpolated delay interpolation can be quite challenging. Things quickly get very messy especially at the ringbuffer boundaries and when allowing arbitrary movement of the read pointer (incl. backwards movement when quickly increasing delay time). What you describe as zipper might simply be a bug.

Post

MeldaProduction wrote: I think saying that "delays work like this", period, is soooo closeminded.
Image

And funny that you're dismissing the algorithm that everyone uses (resampling/interpolation, whatever you want to call it), that nobody has any problems using, as "trivial". Sorry, but you really sound like you have no idea what you're doing. (You also haven't provided the example I requested of any existing product that does whatever it is you want.)

I think I'm done trying to help here. But I really did try.

Post

hugoderwolf: I think we must be not understanding each other here. If you are talking about simple interpolation, then sorry, but that's just not true unless the changes to the delay length are smooth and slow enough. If you meant stretching the delay buffer on delay change, then it's what I'm using and then yes, it IS zipper free.
Sure, what I want is kind of physically impossible, but that doesn't mean I can't want it :D. And in fact I have it, I was merely asking for optimizations, or potential other algorithms I haven't heard of.

SMH: Why are you taking it so personally? I'm simply explaining the problems of the algorithm. You say, they are irrelevant, since it is physically impossible. No problem with that.
For the record if I offended you with the "trivial", then sorry, no offense meant. Often the simplest solution is the best after all ;). It's just that I started with that algorithm many years ago, like everyone else probably :), and soon realized it just didn't meet the expectations.
I actually told you the example! Repeating here: MDelayMB, just tried it, square wave modulation to the delay line, zipper free
Vojtech
MeldaProduction MSoundFactory MDrummer MCompleteBundle The best plugins in the world :D

Post

MeldaProduction wrote: SMH: Why are you taking it so personally? I'm simply explaining the problems of the algorithm. You say, they are irrelevant, since it is physically impossible. No problem with that.
For the record if I offended you with the "trivial", then sorry, no offense meant. Often the simplest solution is the best after all ;). It's just that I started with that algorithm many years ago, like everyone else probably :), and soon realized it just didn't meet the expectations.
I actually told you the example! Repeating here: MDelayMB, just tried it, square wave modulation to the delay line, zipper free
I'm not taking it personally, but you're being quite rude to people trying to help you, who you might also notice are all telling you the same thing.

And sorry, didn't understand what MDelayMB was or where it fit into the conversation. But if your own product is your example of what you want, then it sounds like you already have what you want.

Bye now.

Post Reply

Return to “DSP and Plugin Development”