Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Accelerate movement of layer based on audio

Tagged: 

  • Accelerate movement of layer based on audio

    Posted by Dan Thompson on July 21, 2022 at 7:01 pm

    I have a project with a layer set to constantly move along the x axis using the expression “time*multiplier”, with the multiplier basically controlling the speed.

    Now I would like to take that constant base speed and add to it or multiply it depending on the audio track, so during the quiet parts the layer will move at the normal base speed, and during the louder parts the layer will accelerate and move faster.

    So I’ve imported my audio and converted it to keyframes, but I’m struggling to figure out the right expression to achieve the effect I’m looking for.

    I can’t seem to use the audio keyframes as a multiplier for the speed, instead it’s just moving the layer back and forth, basically adding the value directly into the position value.

    I’m very much a noob in AE so any help would be appreciated. Thanks!

    Filip Vandueren replied 3 years, 9 months ago 3 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    July 21, 2022 at 9:24 pm
  • Dan Thompson

    July 22, 2022 at 7:26 am

    Thanks a lot, Dan!

    It worked like a charm. I think I even managed to add a base speed to your code by adding “+(time*mult2)” to the final outcome. I also added the smooth expression to the audio keyframes to make it less reactive and more average.

    Side question, is there a way to apply expressions like smooth on the layers that are referring to the audio keyframes rather than on the keyframes layer itself? So that I can use different smooth parameters for different layers and parameters? Or do I have to duplicate the layer?

  • Dan Ebberts

    July 22, 2022 at 11:18 am

    Sure, you could include something like this in your expression:

    smoothAudio = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider").smooth(.25,10);
  • Filip Vandueren

    July 26, 2022 at 4:40 pm

    Note that if you use the timewarp effect instead of timereampping, you can actually keyframe playback speed without any headaches

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