Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Audio Amplitude Expression Question

  • Audio Amplitude Expression Question

    Posted by Christine P. on June 7, 2005 at 5:15 pm

    I am using an expression to link the opacity of one layer to the Audio Amplitude layer. My problem is that since the range of my audio layer is so minimal, the opacity change is not visible to the eye. Is there a way to set the minimum and maximum range so that my minimum value of the audio layer becomes 0% opacity and the maximum becomes 100% opacity.

    I appreciate any help you may be able to give!

    Thanks,
    Christine

    Quentin Block replied 14 years, 10 months ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    June 7, 2005 at 5:58 pm

    Something like this should do it:

    minAudio = 0;
    maxAudio = 15;
    minOpacity = 0;
    maxOpacity = 100;

    audio = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);
    linear(audio,minAudio,maxAudio,minOpacity,maxOpacity)

    Adjust the parameters to fit your situation.

    Dan

  • Christine P.

    June 7, 2005 at 6:05 pm

    Thanks so much for your help! I tweaked the numbers to fit my parameters and it’s working wonderfully.

  • Quentin Block

    June 25, 2011 at 4:56 pm

    Took me hours to figure this out as I’m expression-illiterate, but I kept getting an error when I used the above expression.

    I had to change the word ‘audio’ in the last (just inside the parentheses) line to ‘opacity’.
    Then it worked great!!!

    minAudio = 0;
    maxAudio = 25;
    minOpacity = 0;
    maxOpacity = 100;

    thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”)
    linear(opacity,minAudio,maxAudio,minOpacity,maxOpacity)

    Thanks for the start and hope this helps the next person that needs this expression!
    QB

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