Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Setting Min and max values to Sound reactive effect

  • Setting Min and max values to Sound reactive effect

    Posted by Mateja Puhalo on November 25, 2018 at 8:43 pm

    Hello everyone!
    I’m trying to make scale effect reactive to sound channel. I did that, but it looks pretty rough, since scale is happening in range from cca 10% to 100%, while I would like it to be more subtle – so that it is reactive to sound, but it scales down to not more than 90%. Is something like that possible?

    temp = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");
    [temp, temp]

    Daniel Siddall replied 3 months, 4 weeks ago 3 Members · 5 Replies
  • 5 Replies
  • Dan Ebberts

    November 25, 2018 at 9:27 pm

    Something like this probably:

    temp = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);
    newTemp = linear(temp,10,100,90,100);
    [newTemp, newTemp]


  • Mateja Puhalo

    November 26, 2018 at 7:47 pm

    It works perfectly. ☺
    Thank you a lot!

  • Daniel Siddall

    March 26, 2024 at 4:01 pm


    Don’t you think if you explained what those numbers in the parenthesis represent it would be more helpful, since these answers don’t just help the OP but anyone who finds this forum while searching for how to solve their own similar problem.

    Teach a man to fish… know?

  • Dan Ebberts

    March 26, 2024 at 8:38 pm

    Fair enough. The linear() function just says that as the value of variable temp varies from 10 to 100, remap that linearly to an output range of 90 to 100. Any value of temp below 10 gets clamped to an output value of 90 and any value of temp above 100 gets clamped to an output value of 100.

  • Daniel Siddall

    March 26, 2024 at 10:32 pm

    Thanks !

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