Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Linking Audio amp to scale

  • Linking Audio amp to scale

    Posted by Ari Grunzeweig on October 29, 2008 at 3:21 pm
    temp = thisComp.layer("Audio Amplitude - BASS").effect("Both Channels")("Slider");
    [temp*10, temp*10, 100]

    Hi,

    I’m trying to have the scale property of a layer controlled by the audio amplitude of an audio layer.

    I am using this expression on the scale property.. (see above)

    I added the *10 in because the audio amp. value was too low. That is working fine.

    What I can’t figure out is how to modify the expression to be effected less by the amplitude. Basically, I’d like to lessen the magnitude of the effect..

    Any ideas on how I can do this???
    Thanks!!
    Ari

    Ari Grunzeweig replied 17 years, 10 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    October 29, 2008 at 4:36 pm

    I’m not really sure what you’re asking, but I’ll guess that maybe you don’t want the scale value to get so small when the audio is quiet. In that case, you could do something like this:

    temp = thisComp.layer(“Audio Amplitude – BASS”).effect(“Both Channels”)(“Slider”);
    value + [temp*10, temp*10, 0]

    Then just set the pre-expression scale to whatever value want to be the minimum.

    Dan

  • Ari Grunzeweig

    October 29, 2008 at 4:45 pm

    Hi and thanks…

    Maybe I can explain better. The problem I’m having is the the fluctuation in the music is very extreme. As a result, the scale of my layer is going from very large to very small and it may give someone a seizure…

    What I want to do is to do is limit the min and the max of the scale so it still reacts to the music, but in a much lesser way…

    Does that make more sense?

    Thanks!

  • Dan Ebberts

    October 29, 2008 at 4:58 pm

    Ah, something like this maybe:

    minScale = [50,50,100];
    maxScale = [150,150,100];
    minAudio = 0;
    maxAudio = 15; // you need to determine this value

    temp = thisComp.layer(“Audio Amplitude – BASS”).effect(“Both Channels”)(“Slider”);
    linear(temp,minAudio,maxAudio,minScale,maxScale)

    Dan

  • Ari Grunzeweig

    October 29, 2008 at 6:15 pm

    Thanks!! That’s more what I am looking for!

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