Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Avoid jump from one wiggle cycle to another

  • Avoid jump from one wiggle cycle to another

    Posted by Ricardo Avila ponce on November 9, 2018 at 12:40 am

    Hi, I’m using audio generated key frames to apply wiggle to and object rotation. The problem is that every time the audio stop the object jump back to the original rotation value. How can I avoid the jump between every wiggle cycle.

    if(thisComp.layer(“Audio Amplitude”).effect(“Left Channel”)(“Slider”)>1)wiggle(1,10) else ???

    thanks in advance.

    if(thisComp.layer("Audio Amplitude").effect("Left Channel")("Slider")>1)wiggle(1,10) else ???

    Ricardo Avila ponce replied 7 years, 9 months ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    November 9, 2018 at 1:31 am

    It’s tricky–you have to count the previous frames where your condition for wiggling was true and use that to calculate the 5th parameter (time) of the wiggle:


    a = thisComp.layer("Audio Amplitude").effect("Left Channel")("Slider");
    t = time;
    f = 0;
    while (t >= 0){
    if (a.valueAtTime(t)>1) f++;
    t -= thisComp.frameDuration;
    }
    wiggle(1,10,1,0.5,framesToTime(f))

    Dan

  • Kalleheikki Kannisto

    November 9, 2018 at 12:55 pm

    Would be easier to apply the slider value to the wiggle amount

    wiggle(1, thisComp.layer("Audio Amplitude").effect("Left Channel")("Slider")*10)

    The slider output will need the correct multiplier to get it in a sensible range.

    Kalleheikki Kannisto
    Senior Graphic Designer

  • Ricardo Avila ponce

    November 9, 2018 at 3:15 pm

    Wow! I thought it will be something easier like a “hold” expression or something like that.
    It works perfectly, thanks a lot Dan!

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