Forums › Adobe After Effects Expressions › Shift an audio track in the timeline
-
Shift an audio track in the timeline
-
Oleh Fedchenko
June 19, 2022 at 2:07 amHi everyone,
I rarely work with expresses. To work with animatics, I wrote a small script for the task to shift the audio track on the timeline inside the composition / scene. This allows the audio track to be accurately synchronized with the audio within the main animatic composition.
a = thisComp.name;
b = comp(“animatic”).layer(“a”).startTime;
thisLayer.timeRemap.valueAtTime(time + b)
Why is this script not working?
If I write just the name of the scene in the script, then everything works fine.
b = comp(“animatic”).layer(“scene_002”).startTime;
thisLayer.timeRemap.valueAtTime(time + b)
Thanks!
-
Dan Ebberts
June 19, 2022 at 2:28 amI think you just need to get rid of the quotes around the variable name in the second line:
b = comp("animatic").layer(a).startTime;
-
Oleh Fedchenko
June 19, 2022 at 8:25 amSuper!
Now everything works.
Thank you very much!
Log in to reply.