Last active
September 1, 2016 01:14
-
-
Save seblavoie/df3d5fd06968159733ec15dad9390f9a to your computer and use it in GitHub Desktop.
Expression taken here: http://zacklovatt.com/sync-precomp-audio/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use if there is *no* time remapping in parent comp. | |
parentComp = comp("# Main"); | |
compStartTimeInParent = parentComp.layer(thisComp.name).startTime; | |
audioStartTimeInParent = parentComp.layer(thisLayer.name).startTime; | |
fullStartTime = this.startTime; | |
fullEndTime = this.source.duration+startTime; | |
linear(time, fullStartTime, fullEndTime, fullStartTime+compStartTimeInParent-audioStartTimeInParent, fullEndTime+compStartTimeInParent-audioStartTimeInParent) | |
// Use if there *is* time remapping in parent comp. | |
parentComp = comp("# Main"); | |
compStartTimeInParent = parentComp.layer(thisComp.name).startTime; | |
parentComp.layer(thisLayer.name).timeRemap.valueAtTime(time + compStartTimeInParent) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment