how to interpolate between two int numbers?

Josef Rebbe's icon

Hi everyone.

I'm trying to interpolate between two incoming int numbers let's say 0 and 1.
Whenever the value changes from 0 to 1 I want it to increase in floatnumber steps during a certain time, let's say 100 ms.

I tried it with line, but couldn't get it working.
Anybody any tip?

Regards, Josef

Wetterberg's icon

Perhaps you forgot to set the first argument in the line object?

>For floating point output, use a floating point value as the first argument to the line object

Josef Rebbe's icon

That's what I did.
Maybe I forgot something?

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

Jean-Francois Charles's icon

You shouldn't set the "grain size" of line~ to 1000 ms (that's what you're doing with a second argument, check the help file). Here is your working version:

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

Josef Rebbe's icon

Thank you so much!

exeterdown's icon

Just wanted to add this example if anyone comes looking for similar answers:

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