Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Create “a gap” in continous Sinusoidal expresion

  • Dan Ebberts

    December 1, 2012 at 8:01 pm

    Play around with this:

    freq = 1; // osc. per second
    gap = 2; // gap duration (sec)
    amp = 200;

    p = 1/freq;
    t = time%(gap + p);
    yOffset = (t < p) ? amp*Math.sin(t*freq*Math.PI*2) : 0;
    value + [0,yOffset]

    Dan

  • Eden Exposito

    December 2, 2012 at 10:30 am

    Like Always your work is magical Dan!

    I had adapted your expression you can see it here. As you can see “decay” is clamping in parts with this method. Great to do something that is disappearing along time.

    How i can maintain this decay and repeat in every oscillation. Like this screenshot

    I had never seen “(t

  • Dan Ebberts

    December 2, 2012 at 7:33 pm

    For that, I think you’d be better off with something like this:

    freq = 1.75;
    period = 3;
    amp = 100;
    decayTime = 2;

    t = time%period;
    yOffset = amp*Math.sin(t*freq*Math.PI*2);
    value + [0,ease(t,0,decayTime,yOffset,0)]

    Dan

  • Eden Exposito

    December 3, 2012 at 5:50 pm

    Thanks Dan!

    Works!

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