slide rounding error? lerp line?


    Jan 17 2017 | 9:09 pm
    I've put together a little abstraction intending to efficiently get slide to the end of a line. There is a qmetro which ought to be on while the output is not equal to the input, however I'm not getting the correct result from the !=. Is this a rounding error or data type mismatch? What's going on here? Secondly, is there a better way to lerp in vanilla max?
    Thanks!
    Max Patcher
    In Max, select New From Clipboard.

    • Jan 17 2017 | 9:14 pm
      er, slerp?
    • Jan 17 2017 | 10:43 pm
      i am a bit too tired to think... but i think it is because of the calculation which happens inside the slide object.
      have you tried using "if delta == 0 " ? that should work better.
      [delta] does not exist, but i guess you know what you need to do.
    • Jan 17 2017 | 10:45 pm
      btw, your qmetro is much faster than the mouse data. what about using another line with the same speed like the mouse instead of the metro?
    • Jan 17 2017 | 11:53 pm
      Yes, right on Roman. Here's that.
      Max Patcher
      In Max, select New From Clipboard.
    • Jan 17 2017 | 11:56 pm
      I went ahead and implemented quadratic and cubic ease in/out in a line type setup. This would make a sweet external (surprised it hasn't been done already?), though I don't have time to dig in to the API right now. . . . these abstractions ought to do it for now:)
      Max Patcher
      In Max, select New From Clipboard.