Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

start operation on layer time instead of comp time

New Here ,
Dec 18, 2008 Dec 18, 2008
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
TOPICS
Expressions
2.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 18, 2008 Dec 18, 2008
Easy fix:

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

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

Dan
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 23, 2008 Dec 23, 2008
Cheers Dan!
Much appreciated
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 14, 2009 Jan 14, 2009
And if I want to control the start time within the layer (ex: +3 seconds) were do I add it?

Thanx
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 14, 2009 Jan 14, 2009
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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 15, 2009 Jan 15, 2009
LATEST
Thanx bro. You rock!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines