Copy link to clipboard
Copied
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 }
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Ok sir. Thanks for your concern. I really appreciate that.