-
Animate text in by word on markers
Hi there! I’m pretty close here, but I can’t seem to get this.
My end goal is to have text (by word) synchronized with the audio and for each word to animate in incrementally at each marker of the audio layer, starting at the in point of the text layer. I have the markers synchronized already (thanks to a plugin) and also have this expression to the point where it increments the text at each marker.
I’m stuck at getting the expression to start working from the in point of the text layer (which does not have the markers in it). I’m attempting to have all of the markers in one layer (audio) and then have all of the text layers in the composition set across the duration of specific markers that are synchronized with the audio.
The issue I’m trying to solve is that the text animates in at the beginning of the audio layer (layer with the markers), despite my best efforts for it to animate wherever the in point is.
Any help would be appreciated, cheers!
<pre data-stringify-type=”pre”>/* controls the words fading in at markers of audio layer in (“”) */
fade = .5;
m = thisComp.layer(“voiceover 3”).marker;
n = 0;<pre data-stringify-type=”pre”>if (m.numKeys > 0){
n = m.nearestKey(time).index;
if (time < m.key(n).time) n–;
}if (textIndex < n){
0;
}else if (textIndex == n){
t = time;
ease(t,0,fade,100,0);
}else {
100;
}<pre data-stringify-type=”pre”>