change object for float numbers

Dec 8, 2011 at 9:29pm

change object for float numbers

Hello,

I would like to output changes in a float when these changes exceed 0.01

I have a simple solution in the patch below, but there is probably something more efficient. Any ideas ?

– Pasted Max Patch, click to expand. –

Nicolas

#60568
Dec 9, 2011 at 12:02am

I’d probably just scale your normalised output and use a regular [change] object dealing with integers.

– Pasted Max Patch, click to expand. –
#217985
Dec 9, 2011 at 3:07am

Does this do what you want?

– Pasted Max Patch, click to expand. –
#217986
Dec 9, 2011 at 4:37am

I thought that this should work, but it seems to round the number:

– Pasted Max Patch, click to expand. –
#217987
Dec 9, 2011 at 10:16am

Thank you.

Actually… my proposition (using integers) turns out quicker, it seems… As far as my test is reliable ?

– Pasted Max Patch, click to expand. –

Nicolas

#217988
Dec 9, 2011 at 6:32pm

The test was not quite apples to apples, as there was a number box in the other tests that wasn’t in yours. Your method is still the fastest, just not by as much.

– Pasted Max Patch, click to expand. –
#217989

You must be logged in to reply to this topic.