Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Complicated Converting Audio Amplitude into a wavering rotation value.

  • Complicated Converting Audio Amplitude into a wavering rotation value.

    Posted by Hayden Martin on September 22, 2014 at 4:15 pm

    Hi there

    I need to connect the rotational value of a pressure gauge needle to the Audio Amplitude keyframes of some music. But wait, the problem is, I’m struggling to figure out how to make the the needle waver both ways rather than just clockwise. I essentially need every other keyframe value to be inverted so the needle pivots between positive and negative values on the dial.

    Once this is sorted I plan to apply a smooth expression that makes the motion less jarring. I can imagine I’d most likely need to multiply the values too as smoothening over frames that strobe between positive and negative would probably create a particularly tame averaged value.

    Would love some advice

    Cheers!

    HELP! :)

    Hayden Martin replied 11 years, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    September 22, 2014 at 4:27 pm

    I think this does what you’re asking for, but I’m not sure it does what you need:

    thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”)*(timeToFrames(time)%2 ? -1 : 1)

    Dan

  • Hayden Martin

    September 22, 2014 at 5:55 pm

    This certainly does work

    However even if I try to smoothen the resulting motion out I still end up with gentle vibrations.

    I am using this:

    smooth(width=.3, samples=15, t=time)

    Here is the project file:

    8018_testwaver.aep.zip

    What I really need is to have the vibration smoothed over until it could look like keyframes only about 5 frames apart. But as this is music, I cannot necacarilly smooth over important ‘beats’…

    I thought motion blur could help, but the problem is that I’m going to be porting these motion keyframes into Cinema4D where any unnatural motion will be very noticeable.

    Also, how do I cap rotational values to a maximum of -120 / +120 degrees?

    Cheers!

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