If all the IRQ stuff that was just suggested doesn't make you happy, try this:
[sensor input] | [pack 0 n] (where 'n' = the time in miliseconds you would like your signal smoothed by) | [line] (or [line~] if you are using it to control an audio signal] | [expr x] (where 'x' is some math to get the numbers where you need them) | [whatever happens next]
You could also explore [pow] or some of the other maths to do the job of [expr] if you aren't a math whiz. The [line] object is really handy to smooth out a jumpy signal. Try different values of interpolation (i.e. the 'n' in the [pack] object), depending on how fast you need a response versus how jumpy the input is. There used to be a [speedlim] object that also did this nicely and was really designed for sensor input, but the maintainer (Johannes Taelmann) doesn't seem to be maintaining it (and has dropped off the face of the Earth as far as PD in concerned unfortunately!).
d.
David Powers wrote:
Maybe I don't know what I'm talking about, but couldn't you just take the average value over some time period?
~David
On 8/15/06, *patrick* < patrick@11h11.com mailto:patrick@11h11.com> wrote:
hi all, i've done a project using the MULTIO of mamalala and HID to capture the output of my sensors (infra-red, tilt and such). sadly the values are really jittering and i have a logarithm sensor too. i know that each case is unique, but maybe there's some rules to stabilize the fluctuation and correct the curve (logarithm)??? thanks for sharing any knowledge on this! pat