Confusion with ease package accuracy

mogpt's icon

Hello. I'm afraid I'm missing something really obvious but I'm having trouble with the ease package.

I'm trying to ease the result of a line ramp (preferably using an in_out function) but [ease] is not reaching the ramp's destination value. it either goes over or under depending on the different functions.

Max Patch
Copy patch and select New From Clipboard in Max.

My desired output range is quite large, 0 - 16384, because I'm dealing with OSC values from another application with that range. Is the large value range part of the problem? Or am I missing something fundamental about how [ease] works?

Thank you!

Chris Rolfe's icon

10000 / 16384 is still on part of the sine curve. Just use the same range for both line and ease (16384).

Max Patch
Copy patch and select New From Clipboard in Max.

quat's icon

Hi, also having a problem with this. Chris, your solution works. But if you are generating a ramp with a changing destination there are problems where the range gets cut off.

Max Patch
Copy patch and select New From Clipboard in Max.

Chris Rolfe's icon

Your patcher's use of input_range , out_range and paks confuses me a bit. How about a different approach? Drive ease with a line 0...1 and use the resulting output as an interpolation index between the current_value and the target_value. Keep the current value in a PV object. Less confusing, I think. Example:

Max Patch
Copy patch and select New From Clipboard in Max.

The problem of overshoot still remains with one or two ease functions (elastic, back, others?) but this seems pretty close.

quat's icon

Looks good. Thanks!

Chris Rolfe's icon

Looking at your patcher again, it IS possible too to use output_range to remember the last value. It works as long as you don't interrupt the current ramp (causing discontinuity).

Example:

Max Patch
Copy patch and select New From Clipboard in Max.

quat's icon

Awesome, thanks for following up. This one is much easier for me to follow.