Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions changing rotational velocity

  • changing rotational velocity

    Posted by David Hartnett on April 18, 2008 at 1:15 pm

    Hi there, I’m not very well-versed in how scripting works, so answers will have to be in simple terms, thanks!
    I’m using the Trapcode Sound Keys effect, and I’d like its output to effect the rotation of an object. But I would like to set up a relationship between the speed of the rotation and the volume of the music.
    I’ve been trying to add the SK output value to the previous frame’s rotation property value. Like this (applied to the “Small Cog” rotation property):
    n = thisComp.layer(“White Solid 2”).effect(“Sound Keys”)(“Output 1”);
    m = thisComp.layer(“Small Cog”).transform.rotation.valueAtTime(time-thisComp.frameDuration);
    n + m

    It doesn’t appear to return anything other than zero for my “m” variable. My idea was to keep adding the number from SK output to each new frame so that it would keep turning by larger or smaller increments.

    Any ideas?

    -david

    David Hartnett replied 18 years ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    April 18, 2008 at 2:36 pm

    Since you’re using Sound Keys, I think all you need is to set the range falloff parameter to “None(integrate)” so that the output integrates the values from preceeding frames.

    Dan

  • David Hartnett

    April 21, 2008 at 11:14 am

    Oooh, magic. Thank you.

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