One "sample" delay for MAX
Hello everybody,
I want to create a simple mean filter y(n) = [x(n) + x(n-1)]/2 and I need the x(n-1) term. Actually I need to do this with max (with Msp there is the delay~ object).
What do you suggest me in order to delay the previous number in an incoming streams of numbers?
Help!
Thanks in advance
Cheers
Luca
bucket is your friend. :)
...???
Sorry but I do not understand...could you please explain me better what did you mean?
Thanks a lot
Cheers
Luca
I would suggest [comb~] but the [bucket] way might be interesting too.
Luca, just send your stream of Max numbers to bucket, and you will get a stream of numbers delayed by one element. Then send both streams (the original stream and the delayed one) to an expr object wich contains the filter formula. The patch I've attached in my previous post show the procedure. Copy the code from the line that contains
----------begin_max5_patcher----------
to the one containing
-----------end_max5_patcher-----------
and paste it to a Max 5 patcher window.
m
Thanks a lot!!!!
Cheers
Luca
That won't work for audio. Max cannot handle numbers as fast as samplerate.
maybe delay~?