Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Limiting expression

  • Limiting expression

    Posted by Darren Clevenger on October 14, 2008 at 9:21 pm

    Hi everyone,

    I’m very new to expressions and was looking for some help. I’m animating a cut out mouth and have linked the position of the mouth to my audio amplitude. Is there a way that I can just limit the motion to the Y axis? Currently it’s moving down in a diagonal instead of straight up and down. Any ideas would be greatly appreciated.

    Here’s the expression my pick whip created

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

    Thanks again for any help.

    Darren

    Darren Clevenger replied 17 years, 7 months ago 3 Members · 3 Replies
  • 3 Replies
  • Mark

    October 15, 2008 at 12:11 am

    Try this:

    temp = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);
    [100, (temp*2)] the *2 can be replaced by any number, or link it to a slider.

    I am not in front of AE at the moment, but I am pretty sure that this will work.

    Mark

    PS…do not underline the 100, I only did this to show the 100.

    Mark Harvey
    Senior Editor
    Le Réseau des sports

  • Darby Edelen

    October 15, 2008 at 12:43 am

    If this is being applied directly to your position property then I would recommend:

    temp = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");
    m = 2; //multiplier, add a negative sign to reverse direction
    value + [0, temp * m] //current value plus some amount on the Y-axis

    In this case value is the value set in the position property and you are adding to that value only on the Y-axis. You can change the value of m to change the amplitude of the motion based on the audio.

    Darby Edelen

  • Darren Clevenger

    October 17, 2008 at 4:12 pm

    Thanks a lot for the responses! You are geniuses.

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