Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How to “Invert” a Propertie’s value

  • How to “Invert” a Propertie’s value

    Posted by Julio Crespo on April 18, 2007 at 10:11 pm

    A Have an audio layer with it corresponding Audio Amplitude Layer. I link the both channels slider to a linear transition completition property.. OK funtion like a audio meter, but I notice that when the audio have a “PICK” the meter come down. obviously when the slider have a high value, the completion property have a high value as well. I need to invert this relation.. when the slider are up the completion are down. I try to multiply by a Minus number, but the completion still 0% value.

    Lord Scales replied 18 years, 11 months ago 4 Members · 4 Replies
  • 4 Replies
  • Filip Vandueren

    April 18, 2007 at 10:21 pm

    try “100-” in your expression

    or you could alter the linear transition’s angle by adding 180 degrees, that would invert the direction of the filter.

  • Dan Ebberts

    April 18, 2007 at 10:25 pm

    You could use linear() to remap the values, like this:

    audioMax = 25;
    completionMax = 0;

    audioMin = 0;
    completionMin = 100;

    a= thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);
    linear(a,audioMin,audioMax,completionMin,completionMax)

    Fiddle with the first four values until you get it the way you want.

    Dan

  • Julio Crespo

    April 19, 2007 at 6:17 pm

    Thanks Dan. Your expression work fine, but, Can you explain a little more how the linear work?. Just to have a better idea for future uses.

  • Lord Scales

    May 15, 2007 at 9:00 pm

    You have this:

    audioMax = 25;
    completionMax = 0;

    audioMin = 0;
    completionMin = 100;

    a= thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);
    linear(a,audioMin,audioMax,completionMin,completionMax)

    As the “a” value changes from “audioMin” and “audioMax”, the value of the Completion will change in a linear interpolation from completionMin to completionMax.

    Lord Scales

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