change speed of line during a ramp?

Jul 17, 2013 at 9:19am

change speed of line during a ramp?


I wanted to ask if there is any built-in method in max to change the velocity of a part of a ramp generated in line. For example:
- sending (0, 5 5000) would generate the a 5 second ramp, where at each second a new integer number would be reached
- but, if I decide that between numbers 2 and 3 the ramp should be 1/3 slower, is there any relatively simple option already in max, or do I have to achieve this through some patch?



Jul 17, 2013 at 1:19pm

You’ll have to knock together a patch i think. There is a multi segment line third party external I think, a la line~, can’t remember what it is. Or this:


– Pasted Max Patch, click to expand. –

Originally posted by MANUEL POLETTI.

Jul 17, 2013 at 2:04pm

to take your post title literally, I assume you are asking how to vary a ramp’s time argument dynamically. That is to say, do you want the ramp to continue immediately at its new rate? This means keeping track of the current value of the ramp and lots of quite complicated newStart – new Destination – oldTime – remainingTime maths that I’m not too skilled at. That said, using a [phasor~] and simply varying its frequency will generate changes in ramp “velocity”; setting its frequency to 0 will essentially pause the ramp until you need it again.

This is very hacky btw [EDIT; patch updated]:


– Pasted Max Patch, click to expand. –


Alternatively use Barry’s solution, or pid’s here:



You must be logged in to reply to this topic.