Skip to main content
Participant
April 22, 2025
Answered

how do I link audio to object movement?

  • April 22, 2025
  • 2 replies
  • 740 views

I have a muppet style character whos head is like a ball split in half. Lower half is chin, upper half is head.

I want the upper half (head) to move up and down in response to the audio track of dialogue to look like its talking. I can get the head reacting using expressions but the movements are small and the position gets skewed. How can i adjust the height and position of the head talking? I'm an AE newbie learning off tutorials so any help is appreciated.

Correct answer tate_1038

To animate your muppet-style character’s head in sync with dialogue in After Effects, start by importing your audio and selecting Animation > Keyframe Assistant > Convert Audio to Keyframes. This creates a null object called Audio Amplitude with sliders that track volume. Use the Both Channels slider to drive the head movement.

Select the upper half of the head, press P for Position, then Alt-click the stopwatch to add an expression. Paste the following code:

t = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");

tMin = 0; tMax = 20;

yMin = 0; yMax = -30;

yOffset = linear(t, tMin, tMax, yMin, yMax);

value + [0, yOffset];

This moves the head up and down based on audio volume. Adjust tMax and yMax to fit your scene. For smoother motion, wrap the expression in smooth(0.1, 5), and to prevent extreme movement, use clamp(yOffset, -30, 0).

2 replies

tate_1038Correct answer
Participating Frequently
April 22, 2025

To animate your muppet-style character’s head in sync with dialogue in After Effects, start by importing your audio and selecting Animation > Keyframe Assistant > Convert Audio to Keyframes. This creates a null object called Audio Amplitude with sliders that track volume. Use the Both Channels slider to drive the head movement.

Select the upper half of the head, press P for Position, then Alt-click the stopwatch to add an expression. Paste the following code:

t = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");

tMin = 0; tMax = 20;

yMin = 0; yMax = -30;

yOffset = linear(t, tMin, tMax, yMin, yMax);

value + [0, yOffset];

This moves the head up and down based on audio volume. Adjust tMax and yMax to fit your scene. For smoother motion, wrap the expression in smooth(0.1, 5), and to prevent extreme movement, use clamp(yOffset, -30, 0).

shaun98A1Author
Participant
April 22, 2025

thank you very much for the reply. that totally works!

Dan Ebberts
Community Expert
Community Expert
April 22, 2025

Simplest would probably be something like this. Drag your audio file into the timeline, and with that layer selected, do: Animation > Keyframe Assistant > Convert Audio to Keyframes. Then use this position expression for the top half of your head:

minAudio = 0;
maxAudio = 45;
minY = 0;
maxY = 100;
audio = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");
y = linear(audio,minAudio,maxAudio,minY,maxY);
value - [0,y]

You'll want to adjust maxAudio to match the maximum amplitude of your Both Channels slider of the Audio Amplitude layer (use the graph editor to figure out what that should be) and adjust maxY to set how far you want the head to move at maxAudio. Something like that.

shaun98A1Author
Participant
April 22, 2025

Thats the ticket! Thanks, much appreciated. It wouldve taken me a loooong time to figure all that out!