Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Using linear and smooth in the same expression

  • Using linear and smooth in the same expression

    Posted by Rod Duarte on November 18, 2016 at 5:03 pm


    So, this is what I’m trying to do.

    First, I followed Video Copilot’s tutorial on syncing an animation to audio. That provided me with this expression:


    A = lowest average value in your audio waveform graph
    B = highest average value in your audio waveform graph
    C = Value to use instead of A
    D = Value to use instead of B

    This worked. But the animation turns out quite harsh, so I wanted to smooth it out.
    Then I found this:



    2 would be the number of seconds it’s looking at;
    And 5 is the number of frames the smoothing extends to.

    So I tried to do it this way:


    It doesn’t work properly, because I’m trying to make a graphic in the composition, change scale with the music. It’s set to 60,100 in the first expression because I want the minimum size to be 60 and the maximum, 100.
    But when I add that smooth expression below it, the graphic shrinks, I can see in the scale parameter, that’s using little sizes like 1% instead of the 60-100 I want.
    What am I missing?

    Kun Chen replied 1 year, 5 months ago 3 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    November 18, 2016 at 5:08 pm

    I’d say try it this way:

    s = smooth(0.5,19);


  • Kun Chen

    September 18, 2022 at 2:04 pm

    wow!!! thank you! it solved my problem!

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