[PD] jittering sensors
Hans-Christoph Steiner
hans at eds.org
Wed Aug 16 04:03:20 CEST 2006
On Aug 15, 2006, at 7:54 PM, Cesare Marilungo wrote:
> derek holzer wrote:
>
>> 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]
>
> This adds latency and results are still (albeit less) jumpy.
>
> To smooth out a signal coming from a control (especially for midi
> ctls)
> i use:
>
> [input]
> |
> [sig~]
> |
> [lop~ n] (try a n value between 20 and 50)
> |
> [whatever]
>
> Found the trick above posted on this list by somebody else.
You can also achieve this without the added load of audio objects.
[iir] and [lop] in mapping provide filters in the message domain.
.hc
>
> c.
>
>>
>> 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 at 11h11.com
>>> <mailto:patrick at 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
>>
>>
>
>
> --
> www.cesaremarilungo.com
>
> On the Internet, no one knows you're using Windows NT
> -- Submitted by Ramiro Estrugo, restrugo at fateware.com
>
>
>
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/
> listinfo/pd-list
More information about the Pd-list
mailing list