In my max patch I have a motion sensor that is linked to a number box, giving it's value. I want this reading to affect other things around my max patch but it is too sensitive. How would I take an average of the reading between 2 points every 0.5 seconds? Sorry, this is really hard to explain... Many thanks to anyone who can help.
Asked
Active
Viewed 1,012 times
1 Answers
1
This is what I use:
----------begin_max5_patcher----------
528.3ocyVtsaaCCCF9Z6mBAcc1fkZbNLra1ywvPgrMahBrkLjj6xZQe2mDsc
Nr5t3FuTrabfHoo94mHkyywQzL8dvRIeg7cRTzywQQnofgnt0QzJw97RgECi
lqqp.kiNq0mC16P6ekXAkUaHRUcyA2xBzoNa2mXI8FePqbJQEft9lQJJO3wr
IKXM4yImDqU9DFKievrpoRpJAGpIVmwZC30fS3jZ08FH20VW7zE92irLjTR+
CxONlIciqOU84uV3x2JUaNKMqOllUXJ4XhBuwKwwgGylLDEE6ZrNhaK3AoCL
05RrdHNoGXulpqu0Pcz74NVZfIrDF9ypzIQH+1lAlAJ3kWtfqEFucO7tGThr
R3Tg2VKteUCsplJCGCDZlPsgdno35AD+hMPc.JMYR74gRseiGfOo+i4ieiDS
jPu0bYxbDAr0iXv7uw0DNlG9Mkqy++iquWB0d00DAjB9oGGu5lqJPnFfZ7KS
s2lLgQyODvvVgLYN6VPlmJIVmADUj6RF5yhWAgBv48QF90RlVlrb3O2gRfVJ
U+4eg.SXv943xpaL48EQ2k4jiS7Ef0IU30DmDiGPD1gX1JKJ.0oSVERaXXCI
ZxfGaiUM7Qnlzyh4VpF1HTC+CSMyG4I00nl11HQc8ifw1kRTH94qcZSX4hY3
RopcINnSMvix93wVYpv36ic9l3FS6bz9UKnwg84k3eycJxnw
-----------end_max5_patcher-----------
Depending on the amount of updates per second you get from the sensor you can adjust the amount of frames that are buffered on the zl stream object.
Hope that helps, Mattijs

Mattijs
- 1,909
- 3
- 19
- 28
-
You should be able to copy this code and paste in max, it should magically turn into a patch :) – Mattijs Apr 20 '13 at 17:59