math/formula behind line

jirko's icon

Can someone please give me some information about the line formula.

I need to calculate a linear interpolation in a given time range in c++.

Thanks a lot!

Emmanuel Jourdan's icon

Basically, what line does is dividing the range by the number of steps (duration / grain size) to calculate an increment. Then for each grain, you just add the increment.

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

Something like this, in patch: