Forums > MaxMSP

change speed of line during a ramp?

July 17, 2013 | 9:19 am

Hello,

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?

Thanks,

jmmmp


July 17, 2013 | 1:19 pm

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:

<code>

– Pasted Max Patch, click to expand. –

</code>
Originally posted by MANUEL POLETTI.


July 17, 2013 | 2:04 pm

Hi
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]:

<code>

– Pasted Max Patch, click to expand. –

</code>

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

http://cycling74.com/forums/topic/how-to-pack-values-for-a-line-msg/

Brendan


Viewing 3 posts - 1 through 3 (of 3 total)