Forums > MaxMSP

dynamic ramp curve

August 9, 2012 | 7:49 am

Hi all,

I’d like to have a dynamic curve that scales my input as follows:
when the input number is increasing the ramp is steeper, so for instance an input of 4 becomes a 7
when the input number is decreasing the ramp is more lazy, so that a 4 becomes a 2 (these numbers just to give an idea)

I actually managed to do that very simply, by changing the exponential argument of a scale object, as the attached patch shows – of course i need to add [change +] and [change -].

The real problem comes when the argument changes, because while i only want the last output number to change its deceleration curve, as a matter of fact what i have i a sudden jump to another number. And this is completely unwanted.
Do you have any tip?
Thanks!

– Pasted Max Patch, click to expand. –

August 9, 2012 | 11:53 pm

probably the most inelegant solution ever, i came out with this.
Sometimes values jumps as well, so apart from aesthetic, it may be improved on the functional part, as well.
Any ideas on how to improve it?
thanks!

– Pasted Max Patch, click to expand. –

August 28, 2012 | 3:54 pm

mmm.. still no one? ;-)


August 28, 2012 | 4:39 pm

I think the slide object is what you want. You’ll need to play with it a bit to figure out the desired slide-up and slide-down values.


August 28, 2012 | 7:10 pm

The formula for slide is a little tricky in that it won’t get to the exact value at the specified time, since it’s never going to actually reach the target value (it just approaches it asymptotically, though with round-off error you’ll probably eventually get there, but the timing is probably important). I’ve attached an example that improves the timing precision of slide. You can also use curve~ at signal rate.

– Pasted Max Patch, click to expand. –

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