delaying samples

Nov 22, 2010 at 12:43am

delaying samples

Hi all i have few questions for some feedback experiments:
1 – how can i provide just a single value in the input, e.g., one sample, in MSP
2 – how can i delay of one sample the processing in order to have feedback. I tried with delay but i must be doing something wrong because it produces no sound (check the patch)

  1. NL.maxpat
Nov 22, 2010 at 12:58pm


fixed value:

only one sample:
basically impossible, but if it is ok for you to have zeros in the rest
time, you should do that using a buffer with play or index.


when you wqnt to create a feedback loop in maxmsp (and many other languages)
you need to interrupt the signal chain by delaying it for one vector.

in your patch one would do that for example by putting [send~ bubu] [receive~ bubu]
before you go bck into the selector.


Nov 22, 2010 at 12:59pm

you should also put a [clip~ -0.9995 0.9995] into the feedback connection.

Nov 22, 2010 at 5:55pm

cool it works, only strange that delay~ cannot do that…

Nov 23, 2010 at 11:46pm

note that send~/receive~ introduce one vector size of delay, not one sample. You can set your vector size down to 1, but that’s probably going to take a lot of CPU, poly~ can also do that which will still take CPU, but you can mute it when you don’t need.

Nov 24, 2010 at 12:14am

ok i see, still works for some of my chaotic purposes, but it would be nice to see how you do one sample delay. Maybe you can post an example. I still find it difficult when it shouldn’t be in my head. Why delay~ doesn’t do that?

Nov 24, 2010 at 12:44am

if delay would already contain a vectordelay of one sample, it would require 10 times
more CPU as it does now – but the vectordelay is not needed when you do not build
a feedback loop.

when you do a feedback loop and you want to have a delay of 7 samples, you would
do it like this:

make a patcher like that:

[in~ 1]
[send~ #0_bubu]
[receive~ #0_bubu]
[out~ 1]

save it do disk and call it in your main patcher using a poly~, and set the vectorsize to 1 sample:

[poly~ mypatcher 1 vs 1]

insert [poly~ mypatcher 1 vs 1] into your feedback loop.
(it does not do anything except that it is required to make a feedback loop work.)

now you can/have to substract 1 sample from the delay time of [delay~]:
for a delay of 1 sample, use [delay~ 0], for a delay of 7 samples, use [delay~ 6].
of course, now the “first” delay is wrong – so you have to make one extra delay~
object in parallel, which does not go to the feedback, i.e. you make one delay
for the first delay, and another one with 1 sample less, for the looped ones.

btw, a feedback loop of only sample delay will give you a nice sqare wave of 22 Khz – noone
needs that. 2 or 4 samples should be just fine for any kind of audio effects, or in other words:

loop —– first delay

[delay~ 0] —– [delay~ 5]

[poly~ mypatcher 1 vs 4]

Dec 7, 2010 at 12:34am

Hi Roman, sorry i was busy the last days. I tried building your patch but i don’t get it somehow. This is what i did, but the delay~ doesn’t work. I don’t see how a second one can solve that. I’m lost. A

  1. FBmain.maxpat
Dec 7, 2010 at 4:01am

i cant look into the missing poly patcher :) but the feedbackloop belongs INTO the poly.
more tomorrow, when i have max.

Dec 9, 2010 at 11:47am

into the poly i put the four objects you suggested
basically just a send return thing

[in~ 1]
[send~ #0_bubu]
[receive~ #0_bubu]
[out~ 1

but i have to close the loop. i expect this is just to introduce the delay right? I don’t think i quite follow your logic into this. Maybe you can show me the patch?

Dec 16, 2010 at 3:25pm

So Roman,
any news for this patch? :)


You must be logged in to reply to this topic.