the argument of Max/Msp object [line]

176 Views Asked by At

The basic argument for object [line] is a pair of destination/time value, but there's another possible argument - grain, sets the time interval, which is hard to understood.

If [line] is calculating the ramping time (since it's given destination/time value), how does the grain work? [line] is doing linear ramp, so the time interval should be determined by the value you gave it. That makes the argument grain unnecessary. How to understand this argument for the object [line]?

1

There are 1 best solutions below

2
On

The grain argument specifies how often [line] outputs a new value.

What is not specified in the docs is that when you send [line] a new destination value to ramp to, it will start from the previously output value, not from the interpolated value at the time your new message arrives at the object. This means the grain setting can influence its interpolation behavior.

E.g. with grain at 100 ms, sending it 4. 1000 and 50 ms later you send it 8. 1000, the latter line will ramp from 0 to 8., not from the expected 0.2 to 8.