Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Looping an expression itself.

  • Looping an expression itself.

    Posted by John Winthrop on September 30, 2016 at 9:34 pm

    I am using this expression to make a square jiggle and decay to a stop in the y dimension.

    freq =3;
    amplitude = 15;
    decay = 5;

    s = amplitude*Math.sin(freq*time*2*Math.PI)/Math.exp(decay*time);
    scale + [0,s]

    How can I make this expression essentially RESTART every second? I though using “loopOut ( the expression)” would do it but it did not.

    Dan Ebberts replied 9 years, 7 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    September 30, 2016 at 10:10 pm

    This should work:

    freq =3;
    amplitude = 15;
    decay = 5;
    t = time%1;

    s = amplitude*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
    scale + [0,s]

    Dan

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