How to make visuals react to audio in After Effects

Adding audio to video in After Effects is easy, but what if you want to use visuals with your audio? Well, that’s easy too.

Whether it’s a logo, artwork, or text, you’ll be able to have it move in sync with the audio by the time you finish reading this article. Not only that, but you can also make anything else react to audio in After Effects.

Let’s cut to the chase.

Import assets into After Effects

For this project, you will need a piece of audio, a still image or a video sequence and an illustration or a written sentence.

Start a new project in After Effects. Import your still image or video clip into the Project panel. You can do this by dragging files from your desktop or by double-clicking the Project panel and directly opening a file.

Audio is the most important element. You can download royalty-free audio – something with heavier beats will work better. We will use Fun Life in Let’s do.

Once your audio file has been uploaded, drag it into the Project panel. We use the full length of the audio for the video, but you can just use a section of it if that’s all you need.

For the visual (the part that reacts to audio), you can use an artwork preset with a transparent background or add a visual in After Effects. We are going to write a sentence directly in After Effects. If you want to import a phrase or illustration from other programs, you can create a transparent background using Illustrator or Photoshop or Canva.

USE VIDEO OF THE DAY

Drag your background image or video clip into the timeline panel, along with your audio file. If you have a predefined visual element, drag it too. If you write a sentence in AE, you can write it after the other elements are in the timeline panel.

Hit it Text Tool (VSMaryland + J for Mac or VStrl + J for Windows) to type your phrase. Use the Character, Paragraphand Align menus on the right to format your text. Choose a font style that matches the music and a phrase that works with your image or video footage. Your text will be on its own layer in the timeline.

Using keyframes with audio in After Effects

Keyframes are a commonly used tool in After Effects, but you can use them for more than just visual transformations. Engaging with keyframes on your audio layers will open up a whole new world.

Identify audio keyframes

First, we need to extract information from the audio. Right-click on the audio layer in the timeline and navigate to Keyframe Wizard > Convert Audio to Keyframes. This will analyze the audio and produce a new layer called Audio Amplitude.

In the Audio Amplitude layer, click Effects, and you’ll see three channels—left, right, and both. Within each of these channels are audio-related keyframes.

They won’t look like obvious keyframes at first, but if you zoom in on the timeline using the toggle at the bottom, you’ll see them more clearly.

Unless your audio has specific beats only in the left or right channels, you should focus only on the single layer for both channels.

To view audio keyframes as a graph, click Both Channels > Cursor > Graph Editor. Zooming out of the timeline will make the graph look chaotic, but zooming in will smooth it out.

Visually, the graph shows the volume of the audio. So louder music or beats will have larger spikes in the graph, as opposed to quieter areas of the song having smaller spikes.

Make visual react to audio with scale

If you’ve used After Effects before, you’ll know that keyframes for visuals are located under the Transform label in the layer. Opening this label displays the transform options: anchor point, position, scale, rotation, and opacity. We’re going to make our text scale in response to the audio.

On the text layer, open Transform and find Ladder. Hold down Athat (Windows) or Option (Mac) and the stopwatch next to Scale. This opens up other options, including the ability to write our own expressions in code to animate the audio.

Click it Expression Pick Whip button (swirl icon) and drag it up Slide on the audio layer; a blue line will appear as you drag.

This adds a line of code to the Text Scale layer. You will also notice that the text size changes. Now the text starts at 0% size and only expands to 100% at the loudest parts of the music, which is not very often the case.

To change this, we need to add some information at the end of the code. After [temp, temp]write + [100, 100] at the end. This results in your text or image starting at 100% size and only growing with the beats, rather than shrinking.

Add scope to your visual reactions

While the previous technique does the job and makes the visual asset react to the audio, perhaps it is overreacting. If you want the text to react only to the longer beats of the music and not to all the beats of the music, you can smooth the slider keyframes.

Go to the audio layer slider and hold Athat (Windows) or Option (Mac) while clicking the Slider Keyframe Stopwatch. Delete the expression code that appears. Instead, write ease(value,0,0,0,0). You can edit these numbers for more detailed moves later.

The first two value numbers relate to the range in the audio expression that affects the slider (and remember that your text layer is connected to the slider). If you hit the Chart editor you can see the audio range by hovering over each dot and seeing the unit numbers.

If your song starts quietly, you may see low ranges until the audio really kicks in. If you only want the text to sync with the audio after the beat has started, watch the tracks when the beat starts. The song we use begins with a heavy beat. We’ll choose mid-range unit numbers, so that the text only reacts to larger beats and not every beat.

The midrange is around 20-30 with the maximum range at 50. Look at your own audio to decipher your proper midrange. Click on the Chart editor and go back to your line of code. Replace the first 0 with your lower track number and the second 0 with your upper track number.


The second set of value numbers determines what your range will be in terms of percentage. The first 0 must remain the same to determine that everything up to your first number is treated as 0%. The trailing 0 should be changed to 100 to represent 100% of the size of everything between your first and second numbers.

So if you had 25 and 50, your code should now read: ease(value,25,50,0,100). Modify them to your liking if you want more dramatic reactions.

To make your reactions a little smoother, go to Window > Smoother to open the Smoother menu. Then change the tolerance to ten. It only makes a small difference, but it does create slightly smoother motions for your element reactions.

Which animations work best with audio?

Although we focused on scale for this tutorial, audio feedback can be applied to any visual effect found in After Effects. To apply the effect, simply hold Athat (Windows) or Option (Mac) while clicking the stopwatch of any effect, then drag the Expression Pick Whip (swirl icon) to audio Slide.

You can apply dabs of brightness with the effect, even when another effect is present. You can also change opacity with rhythm or motion with anchor point. Everything available in After Effects can be easily attached to your audio channel for a fully immersive experience.

Synchronize visuals with audio in After Effects

Having the ability to sync your text or visual assets with any audio file is a skill that will make people think you’re a superstar video editor. Use your new After Effects skill and apply it whenever you want to add great sounds with great visuals in your videos.

Briana R. Cross