Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects expression help, linking audio to scale height only

  • expression help, linking audio to scale height only

    Posted by Amz370 on February 3, 2006 at 1:43 am

    ok so im helping a friend on a music video, i know all the audio linking procedure basics but what im trying to do is link the audio layer to the video layer so teh video layer expands in just one aspect of scale, it can’t shrink below 100% but it can grow to what ever height, i supose i can figure out the adjustability, but i only want it to effect height or width, not both.

    any help would be appreciated. thank you,

    Mike Clasby replied 20 years, 3 months ago 3 Members · 13 Replies
  • 13 Replies
  • Filip Vandueren

    February 3, 2006 at 2:00 am

    Assuming a is the variable that points to the audio amplitude and on which you have done your basic math,

    [a, value[1]] // for Y scaling
    or
    [value[0],a] // for X scaling

  • Amz370

    February 3, 2006 at 2:01 am

    ok well so far this is the expression and what ive begun to figure our

    expression when linked or “whiped’ to audio amplitude, the layer in question starts at about 15%
    temp = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);
    [temp, temp]

    i can modify the width by adding a # afther temp tem for instance

    temp = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);
    [temp, temp]+20
    but the width still stays the same, what i want to do is A increase the size to 100% all around, and then be able to change just width and height

    once again thanks for any help

  • Amz370

    February 3, 2006 at 2:02 am

    thankyou mr vandueren, i apreciate it

  • Filip Vandueren

    February 3, 2006 at 2:06 am

    You could also use

    [value[0], value[1] + temp]

    starting off with a scale of [100,100]

  • Mike Clasby

    February 3, 2006 at 2:10 am

    Since you know the basics, when you Alt Click, the stop watch, then pickwhip to the slider on the Audio Keyframes layer you get an expression like this:

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

    And the changes are tiny, I can’t see the layer, it shrank so much.

    Now select the first temp in the [temp, temp] and pick whip tat to the x scale, giving you:

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

    Do the same for the second temp in [scale[0], temp], giving you:
    temp = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);
    [scale[0], scale[1]]

    This expression is just giving it the original scale, now we add in the temp to the y scale dimension:

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

    I had to multiply by 10 to see the changes:
    temp = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);
    [scale[0], scale[1]+temp*10]

    Adjust away.

  • Mike Clasby

    February 3, 2006 at 2:12 am

    yikes, I didn’t see this was already answered.

  • Amz370

    February 3, 2006 at 2:15 am

    ok every one ive figured it out with filips help, but something else had to be done other wise it still scales at 15% from start and still modifies only one or the other

    this is my current expression:
    temp = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);
    [temp+[85], temp=100]

    heres what the numbers represent for all those enquiring in the future

    the 85 is an “arbitrary” number that effects the scaling. i say arbitrary because it’s relative to the project. i chose 85 because my lowest % when neither “temp” settings are changed was around 15, so 85 sets a base percentage of 100.

    the 100 is the percentage i set the other value to and it will stay perminant. no matter what changes i do or adjust.

    i will keep this post updated with what i discover, and i will hopfully be posting the short vid i make with these test expressions when ive finished, any question on what im doing feel free to post

  • Amz370

    February 3, 2006 at 2:38 am

    ok so im loving the info, and im very sorry for posting and reposting so quickly, but i have one last request:

    so everything looks awsome, and im amazed with how easy expressions truly are, i supos ei try to overcomplicate, but there is one problem, as the image im minipulating is a buidling the horizontal shif looks great but the vertical one is what i have a problem with, as the house grows psat it’s foundation, now if this was rotation id siplay change anchorpoints, but is there a “anchorpoint” for size changing so the builing only stretches upwards and not downwards

    once again im in your debt

  • Filip Vandueren

    February 3, 2006 at 2:51 am

    Just place the anchorpoint at the bottom edge of the layer, that way it only scales up.

  • Amz370

    February 3, 2006 at 3:13 am

    ok well ive been trying this but im not used to anchor points with a.e. and i don’t know how to adjust it to the point where it doesnt allow it to scale up

Page 1 of 2

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