Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions time remapping’s offsetted speed + slider

  • time remapping’s offsetted speed + slider

    Posted by Peter Zeet on September 17, 2014 at 11:11 pm

    Hi all!
    I don’t know if this is possible..
    I have a composition with time remapping applied on it (2 keyframes, first set at zero and next makes the animation quickier than the original).
    I’d need a slider to control the speed of that time remapping, but making that new speed I did (with these 2 keyframes ) be the base speed, and not the original
    (so, let’s say now is a 123% quickier than the original.. I want to make the slider think that speed is the original, and then change the speed according to that while moving the slider)

    I tried this Dan’s solution from this thread https://forums.creativecow.net/readpost/227/26731, but it makes the slider control the original speed of the comp, and overrides my manually keyframed re-speed…

    spd = effect("Slider Control")("Slider");
    n = spd.numKeys;
    if (n > 0 && spd.key(1).time < time){
    accum = spd.key(1).value*(spd.key(1).time - inPoint);
    for (i = 2; i <= n; i++){
    if (spd.key(i).time > time) break;
    k1 = spd.key(i-1);
    k2 = spd.key(i);
    v2 = spd.valueAtTime(k2.time-.001);
    accum += (k1.value + v2)*(k2.time - k1.time)/2;
    }
    accum += (spd.value + spd.key(i-1).value)*(time - spd.key(i-1).time)/2;
    }else{
    accum = spd.value*(time - inPoint);
    }
    accum/100

    thanks a lot!

    Peter Zeet replied 11 years, 10 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    September 17, 2014 at 11:44 pm

    If you keyframed time remapping is still linear and starts a zero, I would think you could replace the last line with this (not tested):


    if (numKeys > 1)
    factor = (key(2).value-key(1).value)/(key(2).time-key(1).time)
    else
    factor = 1;
    accum*factor/100

    Dan

  • Peter Zeet

    September 17, 2014 at 11:51 pm

    I think it works! Thanks!!

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