dynamic adjustment of line's ramp time, or equiv.

    Jul 01 2008 | 3:00 pm
    Hi, I'm trying to do something that I think is simple, but I'm not finding the right tool for it yet.
    I've got a function object, with domain and range of 0.0 to 1.0
    I was using a line (not line~) object to generate numbers in a ramp from 0.0 to 1.0, according to the ramp speed i set. a bang when the ramp ends resets the line at 0.0 and starts over.
    all well and good so far, but I want to be able to adjust the ramp speed while the ramp is running. It doesn't seem like I can do this with line; if I adjust the speed in the middle of the ramp execution, it pauses when it gets to the end.
    I'm pretty sure I'm taking a wrong approach to this. All I really want to to is have a loop that counts from 0.0 to 1.0 (as high-resolution as possible) at a tempo I can adjust as it runs. What are the correct objects to do this with? I tried using line~ instead, and it had the same problem, and also the output didn't seem as fine grained (which doesn't really make sense to me).
    what's the correct approach to this?
    thanks for all your help, everyone!

    • Jul 01 2008 | 3:07 pm
      Which version of Max are you using? Do you have a super-basic patch for us to modify?
    • Jul 01 2008 | 4:00 pm
      you can abort [line] then choose the same target at a new speed
      also check out [curve~]
    • Jul 01 2008 | 4:07 pm
      Here's how I've done it. This is a conversion of a portion of a patch I'm working on. This uses line~ and function instead of mxj~ curve and ej.function.js.
      Big thanks to Martin Robinson for helping me with the time scaler!
    • Jul 01 2008 | 6:20 pm
      Hi again, thanks for all the advice everyone!
      RE: using "abort" on the line to change speeds: If I'm using a knob, or some other signal, to change the speed continuously, will doing those "aborts" and restarting at the new speed, sound choppy?
      RE: cebec's pather : I'm sorry, I'm new to this; how do I turn that code you've supplied into a working patcher?
    • Jul 01 2008 | 6:22 pm
      If you're using Max 5, you copy everything I pasted including these lines: ----------begin_max5_patcher----------
      open Max, and in the File menu, select New From Clipboard...