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
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 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
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
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
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.
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@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
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@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
-- www.cesaremarilungo.com
On the Internet, no one knows you're using Windows NT -- Submitted by Ramiro Estrugo, restrugo@fateware.com
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
On 15.08.2006, at 20:49, patrick 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
I assume you mean there's (amplitude) noise, rather than timing noise
which is what jitter usually refers to. Otherwise the previous
replies regarding drivers/system software apply.
and i have a logarithm sensor too.
i know that each case is unique
indeed...
, but maybe there's some rules to stabilize the fluctuation
rule 1: check your circuits first, then your patches
circuit: shielded cables, capacitors across sensor output, better
power supply, reduced cable length, better signal conditioning (e.g.
bridge amplifiers),... a scope helps to see where your noise comes from
patches: filtering (averaging is the simplest but often sufficient),
deglitching (looking for single values outside the general signal
trend), delta thresholding (only sending values when they change
significantly),...
Sukandar www.glui.de
if you have access to the firmware code and a programmer, you could do a last & max-change threshold solution in your sensor read loop (this has the advantage of reducing the amount of overhead in your patches.)
pseudo code:
if (abs(last - current) > thres) { last = current; send(current); }
you can also do the same thing in pd as you read values from the device and b4 you do (send, etc) anything w/ them.
On Tue, 2006-08-15 at 14:49 -0400, patrick 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
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Check out the "mapping" library written by Cyrille Henry and me.
There are a number of different objects for dealing with smoothing
out sensor data, mostly written by Cyrille. These include: fir, iir,
median, mean, pmfilter.. There is also [mavg] and [average] in other
libs.
Its included in Pd-extended or in the CVS.
.hc
On Aug 15, 2006, at 2:49 PM, patrick 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
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
On Tue, 15 Aug 2006, patrick wrote:
i know that each case is unique, but maybe there's some rules to stabilize the fluctuation and correct the curve (logarithm)???
| [exp] ,----. | | | [+ ][* 9] | | | [/ 10] | | | |----------' |
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada
Platform? MacOSX I guess. Try lowering your IRQ numbers (increasing priority) for USB (uhci) If PC/Win some mobos let you do this in the BIOS. For linux a low latency kernel will do wonders especialy if you have the patch to tweak te APIC vectors you can get USB responding very fast, but the easiest way is to load up Puredyne which is the fastest "of the shelf" Linux out there for AV multimedia right now. Try the simple things first, like not running loads of crap you dont need. Lastly, the easiest way is to low pass filter /average the signal and just pretend there's no jitter. :)
Else
On Tue, 15 Aug 2006 14:49:11 -0400 patrick 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
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list