Discussion:
start operation on layer time instead of comp time
(too old to reply)
F***@adobeforums.com
2008-12-18 15:54:19 UTC
Permalink
I cannot get this peice of code to start to work its magic att the beginning of the layer its applied to instead of the beginning of the comp the layer is in.

veloc = 10;
amplitude = 150;
decay = 2;

amplitude*Math.sin(veloc*time)/Math.exp(decay*time)

I have tried just writing layertime but Im very new to this whole expression thing and have yet to start to se logic in the strings. So thanx for anny help

/Finn, Sweden
D***@adobeforums.com
2008-12-18 21:14:01 UTC
Permalink
Easy fix:

t = time - inPoint;
veloc = 10;
amplitude = 150;
decay = 2;

amplitude*Math.sin(veloc*t)/Math.exp(decay*t)

Dan
F***@adobeforums.com
2008-12-23 10:01:00 UTC
Permalink
Cheers Dan!
Much appreciated
F***@adobeforums.com
2009-01-14 09:53:12 UTC
Permalink
And if I want to control the start time within the layer (ex: +3 seconds) were do I add it?

Thanx
D***@adobeforums.com
2009-01-14 14:26:04 UTC
Permalink
Like this:

delay = 3;
t = time - (inPoint+delay);
if (t < 0){ value }else{ veloc = 10; amplitude = 150; decay = 2; amplitude*Math.sin(veloc*t)/Math.exp(decay*t) }

Dan
F***@adobeforums.com
2009-01-15 08:07:44 UTC
Permalink
Thanx bro. You rock!

Loading...