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

How to reduce speed of text animation in the following expression ?

New Here ,
Aug 19, 2021 Aug 19, 2021

delay = .03; myDelay = delay*textIndex; t = (time - inPoint) - myDelay; if (t >= 0){ freq =2; amplitude = 100; decay = 10.0; s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t); [s,s] }else{ value }

TOPICS
Expressions
982
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 ,
Aug 19, 2021 Aug 19, 2021

 

I cleaned up your expression so I could read it.

 

delay = .03; 
myDelay = delay*textIndex; 
t = (time - inPoint) - myDelay; 
if (t >= 0){ 
    freq =2; 
    amplitude = 100; 
    decay = 10.0;
    s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);
    [s,s] 
}
else{ 
    value; 
}

 

You have frequency values, amplitude values, and decay values that you can change to modify the timing of those attributes. 

 

There is also a delay value in the first line that can be modified.

 

You also have a problem. "textIndex" is not a global function and is not defined. Where are you using this expression and what are you trying to do?

 

 

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 ,
Aug 19, 2021 Aug 19, 2021

Hello Sir, actually I'm working on a lyrical video, and the text is not matching the lyrics of the poem, so I wanted to delay the speed of the text animation so that it just gets synced with the poem.

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 ,
Aug 19, 2021 Aug 19, 2021

I'm assuming you have this expression applied to the Amount parameter of a text animator expression selector with Based On set to Words, is that correct? If so, you can adjust the timing with the delay variable, but it seems unlikely that would ever sync with your poem exactly. I think you'd be better off to put a layer marker where you want each word to animate and modify the expression like this:

m = thisLayer.marker;
val = 0;
if (m.numKeys > 0){
  n = m.nearestKey(time).index;
  if (time < m.key(n).time)n--;
  if (textIndex <= n){
    t = time - m.key(textIndex).time;
    freq =2; 
    amplitude = 100; 
    decay = 10.0;
    s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);
    val = [s,s] 
  }
}
val

 

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 ,
Aug 19, 2021 Aug 19, 2021

I'm with Dan on this. When doing lyric videos, or more accurately "Dynamic Text Animation" each comp should be no longer than a phrase or sentence. Trying to do a three or five, or ten-minute video in one comp is going to get incredibly frustrating. 

 

I take my audio track into Audition, add markers, name each marker with the words that I want to appear or the action I want to happen in the video, then bring the audio track into AE, cut it up in a comp, pre-compose each section so that I have trimmed audio with markers in each new comp, then add and animate the comp using the markers as keys in the expressions as well as layer in and out points. My expressions look a lot like the one Dan gave you. 

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 ,
Aug 21, 2021 Aug 21, 2021
LATEST

Ok sir. Thanks for your concern. I really appreciate that. 

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