Hi all,
my name is Rodolfo and I'm from Italy. I use PD (only Vanilla for now) since January and I'm still working to improve my knowledge about this fantastic programming language. Currently, I'm trying to recreate some electronic architectures based on the delay lines with feedback to obtain an audio effect (e.g. flanger, phaser, etc.). To recreate these circuits, I have used the delwrite~ and delread~/vd~ objects but they don't allow less than about 1,5 milliseconds of delay due to the feedback of the signal which is computed by blocks of 64 samples. To solve this, I have used the block~ object to force the computation of the signal by blocks of a single sample. It works good - the minimum delay is one sample - but it requires more effort by the processor. Then, I'd like to ask you: is there another way - a lighter way - to get the same result?
Waiting for your reply.
Regards.
-
More precision in delay lines with feedback
-
Block size of 64 samples increases efficiency because the signal is processed by each PD object one block at a time. This is better for pipelining in the CPU, but it also means that you can't have feedback loops smaller than one block. Programming everything as an external would be faster, but otherwise there's not much that you can do. It's a general DSP problem and not specific to PD.
-
Ok, I know that all DSPs actually don't work in real time and always create a time delay due to the computation of the signal by blocks; but, e.g. in a flanger effect, how is it possible to make the difference between the orginal and the delayed signal less than a block (about 1,5 milliseconds)?
-
Check out Maelstorm's posts in these threads for ways of getting shorter delays without running your whole patch with [block~ 1]
http://puredata.hurleur.com/sujet-5245-audio-control-signal
http://puredata.hurleur.com/sujet-5078-problem-delay-line-cannot-shorter
-
Thanks for your clear reply. I haven't told it precisely but I made the same thing that Maelstorm explained in the second thread: I mean I've used a block~ object in a subpatch. Anyway, I gather that there is no other solution to obtain a delay less than 1.45... msec, isn't it?
-
Here's an example of Maelstorm's first trick, which is delwrite~ and vd~ in separate subpatches connected (delwrite -> vd~) by dummy outlet~ and inlet~ to force the write to occur before the read.
This gets down to a 1-sample minimum delay, and does not require running anything with [block~ 1].
This won't work for a feedback delay, but for a simple flanger you don't need feedback, just a delay-and-add with a slowly varying delay.
http://www.pdpatchrepo.info/hurleur/delwrite_vd_subblock_delay_trick.pd
-
Ok, thanks again.