Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Glow intensity tied to audio amplitude

  • Glow intensity tied to audio amplitude

    Posted by Al Johnson on November 15, 2008 at 8:43 pm

    I’m trying to attach the glow intensity of a layer in a Comp called “Tunnel” to the Audio Amplitude of a comp called “Rush”. This is what I have so far:

    d = thisComp.layer(“glow”).comp(“Rush”).layer(“Audio Amplitude”).effect(“Right Channel”)(“Slider”);

    minScale = [.1];
    maxScale = [2];
    dAtMinScale = .1;
    dAtMaxScale = 2;

    linear(d,dAtMaxScale, dAtMinScale, maxScale, minScale)

    However, this only sets the glow intensity to the max value, it won’t fluctuate based on the audio amplitude properties in the other comp. It must be something simple I’m missing, but I can’t get it. Also, I don’t know if I even totally understand this expression. As far as I understand it means d is between 2 and .1 (based on the datminscale/datmaxscale part) and then they are connected in a linear way. However, I don’t quite know what the minscale and maxscale parts are defining. If anyone could clear that up for me and help me with why this isn’t working that’d be great. Thanks for any help.

    Dan Ebberts replied 17 years, 6 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    November 15, 2008 at 9:22 pm

    This should work better for you:

    d = comp(“Rush”).layer(“Audio Amplitude”).effect(“Right Channel”)(“Slider”);

    minGlow = 0;
    maxGlow = 5;
    dAtMinGlow = 0;
    dAtMaxGlow = 15;

    linear(d,dAtMinGlow, dAtMaxGlow, minGlow, maxGlow)

    You should just need to set the parameters for the min and max glow, and the audio levels that correspond to the glow levels. All linear() does is convert the range of audio levels to the correponding range of glow intensities.

    Dan

  • Al Johnson

    November 15, 2008 at 10:53 pm

    Ah great. Thanks for explaining that. One more thing, and this might be much more tough than I want it to be. Say I wanted this expression to work but start from 10 seconds into the rush comp (as opposed to at the beginning). How would I offset the start time like that?

  • Dan Ebberts

    November 16, 2008 at 12:02 am

    You could do it like this:

    if (time >= 10){
    d = comp(“Rush”).layer(“Audio Amplitude”).effect(“Right Channel”)(“Slider”);
    minGlow = 0;
    maxGlow = 5;
    dAtMinGlow = 0;
    dAtMaxGlow = 15;
    linear(d,dAtMinGlow, dAtMaxGlow, minGlow, maxGlow)
    }else{
    value
    }

    Dan

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