Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Having a layer’s scale value control audio? (note: opposite from audio controlling movement) -thanks

  • Having a layer’s scale value control audio? (note: opposite from audio controlling movement) -thanks

    Posted by Robert Combs on January 9, 2016 at 9:34 am

    Hi!

    I’ve been searching a lot but my problem is a bit backwards from having audio effect a layer’s property. I actually need the opposite. I need a layer to effect an audio (tone generator) property (with some limits. Anyone care to help me take a stab at this? I’m a complete noobe. Other than pick-whipping or wiggle, I’m pretty much lost.

    Here’s my setup….

    I have a layer, “Shape Layer 1” that contains a shape.

    I have 3 keyframes within the Scale property of “Shape Layer 1” that go from 0% to 100% to 0%.

    I have another layer, “Deep Red Solid 1” that contains the AE audio effect called “Tone” (the audio tone generator).

    “Tone” has a key frame-able variable called “Frequency 1” (whose value by default is set to 440)

    I’d like the value of “Frequency 1” to change in accordance with the Scale value of “Shape Layer 1”

    However, I’d like to also be able to set a minimum and maxim value range for “Frequency 1” (i.e. min 440 , max 2000).

    Can this be done? I’m so new at this I can only get the frequency to go from 0 to 100, which isn’t working out for my needs.

    Can anybody here lend me a hand with this? I’d most certainly be appreciative.

    Sincere thanks!
    Rob

    Robert Combs replied 10 years, 6 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    January 9, 2016 at 6:42 pm

    Probably something like this:

    minFreq = 440;
    maxFreq = 2000;
    minScale = 0;
    maxScale = 100;
    s = thisComp.layer(“Shape Layer 1”).transform.scale[0];
    linear(s,minScale,maxScale,minFreq,maxFreq)

    Dan

  • Robert Combs

    January 10, 2016 at 12:17 am

    This works fantastically!
    Thank you so much Dan!

    Rob

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