Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Pulse expression edit

  • Pulse expression edit

    Posted by Mario Pascal on December 28, 2016 at 5:49 pm

    I need an edit on this expression

    minAudio = 0;
    maxAudio = 100;
    minStretch = 90;
    maxStretch = 130;
    audioLev = thisComp.layer(“Sound Keys”).effect(“Sound Keys”)(“Output 1”);
    s = linear(audioLev, minAudio, maxAudio, minStretch, maxStretch);
    [s,s]

    Instead of it stretching I want it to control the opacity so when the audio level is 100 the opacity will be 130 as the max. Yes, I used Sound Keys to isolate bass so it will react to bass, help please!

    Dan Ebberts replied 9 years, 3 months ago 3 Members · 5 Replies
  • 5 Replies
  • Dan Ebberts

    December 28, 2016 at 6:39 pm

    I’m not sure why you would want opacity to go to 130, but editing the expression should be pretty easy. All you need to do is remove the last line:

    minAudio = 0;
    maxAudio = 100;
    minStretch = 90;
    maxStretch = 130;
    audioLev = thisComp.layer(“Sound Keys”).effect(“Sound Keys”)(“Output 1”);
    linear(audioLev, minAudio, maxAudio, minStretch, maxStretch);

    Dan

  • Mario Pascal

    December 28, 2016 at 7:07 pm

    Lol thanks but i meant like if the audio goes to 100 then the opacity will go to x%(whatever number i choose)

  • Dan Ebberts

    December 28, 2016 at 7:49 pm

    Then I say choose one and set maxStretch accordingly. ????

    Dan

  • May Kum

    January 27, 2017 at 12:13 pm

    Thanks, Dan! Would you tell me what does “s” means in this expression?

  • Dan Ebberts

    January 27, 2017 at 4:51 pm

    It’s just a variable name. I could have used anything. The purpose of the variable is to temporarily store the value of the linear() interpolation so I can use it in the next line so that the scale will be the same for x and y.

    Dan

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