Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Scale expression – Could someone help please?

  • Scale expression – Could someone help please?

    Posted by Frank Manno on March 19, 2009 at 1:39 am

    I’m jumping in on the deep end here.

    I ended up needing to do something and never had time to property learn about expressions. I literaly know nothing about them.

    How can I get the scale layer to scale to 120%, stay there 15 frames, then back to 100% for another 15 frames, then back to 120%?

    I’m editing to a music beat and want the picture to scale back/forth on the beat.

    I’m using Trapcode Sound Keys to link my scale layer to the beats. I got that part all done ok but it looks all wrong. What’s it’s doing is starting from 0% and on the beat it’s comming up to 100% then back to 0%.

    Any help appreciated…

    -Frankie

    Frank Manno replied 17 years, 2 months ago 2 Members · 3 Replies
  • 3 Replies
  • Filip Vandueren

    March 19, 2009 at 3:52 am

    you could try remapping the 0-100% values of the keyframes to 100-120 like this:

    (add to the allready keyframed scale):

    s=value[0];
    linear(s,0,100,100,120);
    [s,s];

    If you just want to cycle the values between 100 and 120 every 15 frames, try this:


    t=timeToFrames(time);

    t=t%45; // this will loop every 45 frames:

    if (t<15) {
    s=ease(t,0,15,100,120);
    } else if (t<30) {
    s=120;
    } else {
    s=ease(t,30,45,120,100);
    }
    [s,s];

    Those eases can be switched with linear or easeIn or easeOut

  • Frank Manno

    March 19, 2009 at 7:44 am
    temp = thisComp.layer("Black Solid 1").effect("Sound Keys")("Output 1");
    [temp, temp]

    Thanks Filip for your response,

    What you’re saying is kind of working but I can’t seem to get it to work with Trapcode Sound Keys.

    I’m linking the sound keys layer to the footage layer ‘scale’ and sound keys is doing it’s job by scaling on the beat but not the way I want it to.

    I think I need sound keys support/help. After I link the sound keys layer to my scale parameter,it generates the following expression that I have posted above.

    What I want is scale 110% then 100%, then 110% then 100% on each music beat controlled by the sound keys layer.

    By the look of the expression I posted, does it seem that I need to edit the expression below to get what I want or with sound keys?

    Where would you say the answer lies, the scale layer or sound keys?

    -Frankie

    [Filip Vandueren] “you could try remapping the 0-100% values of the keyframes to 100-120 like this:

    (add to the allready keyframed scale):

    s=value[0];
    linear(s,0,100,100,120);
    [s,s];

    If you just want to cycle the values between 100 and 120 every 15 frames, try this:

    t=timeToFrames(time);

    t=t%45; // this will loop every 45 frames:

    if (t<15) {
    s=ease(t,0,15,100,120);
    } else if (t<30) {
    s=120;
    } else {
    s=ease(t,30,45,120,100);
    }
    [s,s];

    Those eases can be switched with linear or easeIn or easeOut"

  • Frank Manno

    March 19, 2009 at 12:29 pm

    It’s cool I fixed it!.

    The solution was in the Plugin – Setting a custom output range.

    Thanks again for your help.

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