FORUMS: list search recent posts

# scale bounce in one direction x or y

FAQ   •   VIEW ALL
 scale bounce in one direction x or y on Jul 16, 2011 at 11:40:56 pm

Hi, several year ago I posted about how to make a scale bounce, and Mr. Dan Ebberts send me this great expression, I abuse it a lot, and now I need to move it in only one direction, x or y. this is the expression.

Thanks

```n = 0; if (marker.numKeys > 0){ n = marker.nearestKey(time).index; if (marker.key(n).time > time){ n--; } } if (n == 0){ value; }else{ maxDev = 10; // max deviation in pixels spd = 10; //speed of oscillation decay = 3.0; //how fast it slows down t = time - marker.key(n).time ; x = scale[0] + maxDev*Math.sin(spd*t)/Math.exp(decay*t); y = x; [x,y] }```

 Re: scale bounce in one direction x or yon Jul 17, 2011 at 12:42:40 am

Just change:

[x,y]

to:

[x,value[1]]

That should do it.

Dan

 Re: scale bounce in one direction x or yon Jul 17, 2011 at 1:29:51 am

Thanks.
I figure out the effect in Y position just I need to change the value in
[x,value[1]] to [value[2],y], nop don't work...couse is 0 no 2..

Kind regards