Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions expressions for audio…

  • expressions for audio…

    Posted by Luis Garcia on November 10, 2015 at 8:33 am

    Hi! I have two audios in a composition. One is music, and the another one is a voice… I would like to adjust the voice to the music…The music sometimes has the sound level high, another times low… I would like that the voice always had (for example)5db more than the music, so if the music is higer, the voice should be higher too, so the music always had the same “proportion” with the music….

    I don´t know if I could get it with expressions… Any idea?

    A lot of thanks!

    Tom Granberg replied 5 years, 6 months ago 3 Members · 5 Replies
  • 5 Replies
  • Kalleheikki Kannisto

    November 10, 2015 at 12:31 pm

    The usual handling is to make the music lower when there is voiceover.

    But, to do what you’re asking: You could convert audio to keyframes for the music channel, add a Smooth expression to the keyframes and link the volume control of your voice to those keyframes. I suspect it is going to sound very uneven; at least you’ll need to set a minimum level for the voice so it doesn’t disappear when the music goes low (with a Math.max expression).

  • Luis Garcia

    November 10, 2015 at 1:01 pm

    Thanks for your answer Kalle Kannisto!! Could you tell me how would be the expression to set a minimun level of music?

    How would be the smooth expression?

    I am very sorry with this questions but I am not clever with expressions … Sorry!

    Thanks in advance!

  • Kalleheikki Kannisto

    November 10, 2015 at 3:08 pm

    This is how it could be set up.

    For Audio Amplitude (created from music), Both Channels:

    smooth(.1,5)// 5 samples over .1 seconds

    More samples over longer time gives you progressively smoother results.

    For Audio Levels of your voice channel:

    minvol = -6;//minimum volume level
    offset = -6;// offset value for volume
    mult = .5;//multiplier for voice volume
    vol = Math.max(minvol,thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider")*mult+offset);
    [vol, vol]

    Doesn’t have to be that complex, but this’ll give you some control over how much the volume gets changed.

    When you’ve tried that, here’s the likely more workable option of ducking the music when there is voice.

    Create the Audio Amplitude from the voice, put the smooth expression on it, then use this for music volume setting:

    maxvol = -6;//maximum volume level
    offset = -6;// offset value for volume
    mult = .5;//multiplier for music volume ducking amount
    vol = Math.min(maxvol, offset-thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider")*mult);
    [vol, vol]

  • Luis Garcia

    November 10, 2015 at 11:11 pm

    A lot of thanks!!!! I will prove it and feedback you!!!

    You are great Kalle….

    Thanks! Thanks! Thanks!

  • Tom Granberg

    October 26, 2020 at 4:17 pm

    I having trouble making this work in AE2020

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