Forums > MaxMSP

Absolute value interpolation maintaining accuracy!

Feb 15 2012 | 10:07 am

Hi there,

I am taking data from an absolute encoder which is measuring rotation and I need this to stay accurate (e.g. 0 on encoder = 0 degress, 63 on encoder = 180 degrees) but I also need to smooth between the values.

Does anyone have any bright ideas?



Feb 15 2012 | 10:27 am

What you do, in part, depends on what the absolute encoder is putting out (0-359?) Typically something like [Scale rotminvalue rotmaxvalue 0 127] in to a line object to perform smoothing should do the trick. Or is it something trickier in which case we may need more info…

Feb 15 2012 | 10:49 am

Hi spectro,

The encoder im looking at outputs 0 – 255 actually so I used scale to map this from 0 – 360 but as i am using this to move an image each increment of 1 causes a less than smooth jump in degrees.
Does that make more sense?

Im using scale before line which gives me floats but there are still market leaps in the values.

Feb 15 2012 | 11:16 am

With that range you won’t of course get the precision to place the image to a single degree, but with that said, it should be possible to have a gradual motion to your destination without ‘marked leaps". I’ve attached an example here, but not sure how you’re going about it with yours. Maybe you could post your patch…

-- Pasted Max Patch, click to expand. --

Viewing 4 posts - 1 through 4 (of 4 total)

Forums > MaxMSP