Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions time remap expression framesToTime

  • time remap expression framesToTime

    Posted by Benjamin Graham on October 6, 2010 at 10:28 am

    Hi again. I need some help with time remaping. Basically I’m trying to do a smart time remap. I have a precomp with an image sequence in it. I want to be able to choose an in point on that seq and then have a slide to choose the frame from that in point onwards, So I’m thinking something along these lines. I need to use the values on the slider as frames rather than seconds as if it’s seconds I’m likely to drop frames if I’m not careful. So first I had this

    comp("Char_Ctrls_Comp").layer("Null 1").effect("Slider Control")("Slider")*.04

    In South africa we work on 25 so this remaps the slider correctly but you cant just add 3 to this number as it’s some funky decimal conversion in order to spit out seconds instead of frames. So I’m trying to use framesToTime function but I’m not clever enough to make it work. Can anyone help.

    framesToTime(comp("Char_Ctrls_Comp").layer("Null 1").effect("Slider Control"))("Slider"), fps = 25.0 / thisComp.frameDuration)

    I’m hopping I can then add a number to this value and have it return seconds for the time remap without me having to try and do the weird math. It’s not hard but it’s going to get more and more inconvenient so I’m trying to deal with this before the numbers get huge.

    I’m especially unsure what to do with thisComp.frameDuration whats this even for?

    Thanks so much.

    Benjamin Graham replied 15 years, 7 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    October 6, 2010 at 5:58 pm

    Just try it this way:

    framesToTime(comp(“Char_Ctrls_Comp”).layer(“Null 1”).effect(“Slider Control”)(“Slider”))

    You only need to do the 1.0/thisComp.frameDuration part if you need to calculate the frame rate. The default is the comp’s frame rate.

    Dan

  • Benjamin Graham

    October 7, 2010 at 10:34 am

    Works perfectly. Thanks so much. And also thanks so much for your contributions on motionscript.com they have been helpful and inspirational.
    Thanks.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy