After Effects audio to keyframes: make animation react to music in 4 steps

HomeAfter Effects audio to keyframes: make animation react to music in 4 steps

Audio to keyframes in After Effects: animate to music in 4 steps

After Effects audio to keyframes: make animation react to music in 4 steps

A logo that pulses with the music makes a video feel alive. And you don’t need to place a keyframe on every beat by hand. After Effects has its own tool for this: Convert Audio to Keyframes. It turns sound into numbers. Then an expression links those numbers to any property you like. In this post, we explain audio to keyframes in 4 steps. We also compare animating to loudness with animating to beats.

Let us make your video

We edit music-driven Reels, product videos and logo videos. Using After Effects? Our free Beat Sync extension marks the beats in one go. If you’d rather leave the video to us, get a quote.

In short

  • Select the audio layer and run Animation › Keyframe Assistant › Convert Audio to Keyframes.
  • After Effects creates a layer named Audio Amplitude with three sliders.
  • You link a slider to Scale with `linear()`.
  • If it jitters too much, you smooth it with `smooth()`.
  • For a sharp move on each hit, beat markers work better than loudness.

3

sliders created (Left, Right, Both)

1

keyframe on every frame

100–130

Scale range in the example (%)

How does audio to keyframes work? 4 steps

1. Convert the audio to keyframes

First, select the audio layer. Then run Animation › Keyframe Assistant › Convert Audio to Keyframes. After Effects creates a null layer named Audio Amplitude. This layer has three effects: Left Channel, Right Channel and Both Channels. Each one has a Slider with a keyframe on every frame.

Note that the command reads all the audio in the composition. So to react to one sound, like the drums, mute the other audio first. This tip comes from a thread in the Adobe community.

2. Look at the values

On the Audio Amplitude layer, select the Both Channels slider and open the Graph Editor. The values usually don’t move between 0 and 100. In most cases, even the peak stays much lower. So note the highest value. You will use this number in the next step.

3. Link it to the animation

Pick the layer you want to move. Alt-click the stopwatch next to Scale (Option on a Mac). Then paste this expression:

a = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");
s = linear(a, 0, 20, 100, 130);
[s, s]

When the sound is at 0, the layer stays at 100%. When it reaches 20, the layer grows to 130%. Also, `linear()` never goes past the range. The 20 here is only an example. So replace it with the highest value you saw in the Graph Editor.

The same method works on other properties too. For Opacity, for example, you write `linear(a, 0, 20, 40, 100)`. In that case, it returns a single number, not an array.

4. Reduce the jitter

Since the audio is read on every frame, the motion can look jittery. You can smooth it with `smooth()`:

a = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider").smooth(0.2, 5);
s = linear(a, 0, 20, 100, 130);
[s, s]

`smooth(0.2, 5)` takes 5 samples over 0.2 seconds and averages them. On the other hand, for motion only on strong hits, raise the lower limit. For example, with `linear(a, 12, 20, 100, 130)`, sounds below 12 won’t move the layer.

Turning the audio value into Scale
Example: the Both Channels value (top) mapped to a 100–130% Scale range with linear() (bottom). Values are illustrative.

Loudness or beats?

The two methods don’t measure the same thing. Convert Audio to Keyframes reads loudness on every frame. Animating to beats, however, finds the rhythm of the music. So the results differ too.

Loudness (Audio to Keyframes)Beats (Beat Sync)
What it measuresLoudness on every frameBeats, strong beats and downbeats
ResultConstant, wavy motionA sharp move or cut on each beat
SettingsBy expressionIn a panel: kick, snare, hi-hat, sensitivity
Best forAudio waves, a pulsing logoReels edits, a flash or shake on the beat

Beat Sync writes the beats as After Effects markers. Then it links the animation you choose to those markers. We cover the details in our post on syncing animation to music.

Why isn’t it working?

Too little motion

The top value in the expression is higher than the sound ever reaches. Check the Graph Editor and lower the 20.

Everything jitters

The audio changes on every frame. So add `smooth()` or raise the lower limit.

The wrong sound is read

Other audio in the composition was counted too. Mute it and run the command again.

The expression shows an error

If the layer isn’t named “Audio Amplitude”, the expression can’t find it. Either rename the layer back or change the name in the code.

How do we make music videos at CrazyPoint?

We are an agency based in Ankara. Ideas, shooting, editing, color and sound are done by the same team. For music-driven videos, the work moves in three steps:

  1. Music and idea: Together, we choose the music and the motion idea that fit the video’s goal.
  2. Rhythm: We find the beats with our own Beat Sync extension and fit the edit and animation to the music.
  3. Delivery: We deliver the video in Reels, Stories and landscape sizes.

Shooting, editing and 3 rounds of revisions start at 15,000 TL + VAT. For editing-only jobs, we quote after seeing the footage.

Frequently asked questions

Why don’t the values reach 100?

The command measures overall loudness, not single beats. So the values often stay low. You map them to the range you want with `linear()`.

Can I do this in Premiere Pro?

Premiere Pro doesn’t have this command. However, the Premiere version of Beat Sync writes the beats to the sequence as markers. It also lines up photos and clips to the beats.

Is Beat Sync paid?

No. Beat Sync is free until 5 January 2027. Sign in with your Google account on the app page and download it.

Can I use the expression on other layers?

Yes. Copy the code and paste it into the Scale or Opacity of other layers. They all read the same Audio Amplitude layer.

Let us make your music video

Tell us where the video will run and what it should say. We will agree on the scope and send a written quote. For details, see our Video Production page.

Comments are closed