Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Layer1 Audio Adjusts the audio levels of Layer2? But How?

  • Layer1 Audio Adjusts the audio levels of Layer2? But How?

    Posted by Brandonbrown on November 14, 2007 at 6:14 pm

    I have a composition full of classified style ads (each with a voiceover) with a music bed that runs the duration of the entire movie. [b]I want the music bed to drop 10dB any time a voice over read shows up and rises back up 10dB when the voice over stops.[/b] Before laying down the Music bed, I can generate a Audio Amplitude track with the “Convert Audio to Keyframes.” Anytime there is no voice over the slider reads 0; anytime there is voice over the slider reads greater than 0–so we have a good clean “if/else” base to work with.

    [i]The script below works ok, but[/i]… there is no ramp for the transition from 0dB to -10dB so the audio just drops and rises immediately (instead of over 1 second. I’m also not sure how to tell the property to ramp “backwards” (-10dB to 0dB) when the voice over stops.

    This script is applied to the Music Bed to be manipulated:

    temp = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);

    if (temp>0){
    temp = -10
    }else{
    temp =0
    }

    [temp, temp]

    Can anyone help?

    Thanks.

    Brandon Brown
    http://www.brandonbrown.org

    Dan Ebberts replied 18 years, 10 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    November 15, 2007 at 3:59 pm

    This would be a pretty complicated piece of code to bite off. You’d have to loop through all the previous frames to figure out if you were in an up ramp or a down ramp and integrate the output value accordingly. Not impossible, just tricky.

    Dan

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