Forums > MaxMSP

change object for float numbers

December 8, 2011 | 9:29 pm

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


December 9, 2011 | 12:02 am

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

– Pasted Max Patch, click to expand. –

December 9, 2011 | 3:07 am

Does this do what you want?

– Pasted Max Patch, click to expand. –

December 9, 2011 | 4:37 am

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

– Pasted Max Patch, click to expand. –

December 9, 2011 | 10:16 am

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


December 9, 2011 | 6:32 pm

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. –

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