Forums > MaxMSP

delaying samples

November 22, 2010 | 12:43 am

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
November 22, 2010 | 12:58 pm


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.


November 22, 2010 | 12:59 pm

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

November 22, 2010 | 5:55 pm

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

November 23, 2010 | 11:46 pm

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.

November 24, 2010 | 12:14 am

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?

November 24, 2010 | 12:44 am

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]

December 7, 2010 | 12:34 am

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
December 7, 2010 | 4:01 am

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

December 9, 2010 | 11:47 am

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?

December 16, 2010 | 3:25 pm

So Roman,
any news for this patch? :)

Viewing 11 posts - 1 through 11 (of 11 total)

Forums > MaxMSP