top of page

Audio React Expression

Background Line UI

Advanced Expression, Time Based Animation, Dynamic, Animation Techniques, Audio React

Audio React Expression

This expression scales a layer based on audio amplitude, increasing size when the audio level exceeds a set threshold. It also smooths the scaling animation by referencing the previous frame's scale value for better motion.

This expression animates a layer's scale in sync with audio beats. It monitors the "Audio Amplitude" layer and triggers scaling when the audio surpasses a set threshold. The `linear()` function maps audio values to a chosen size range, while `valueAtTime()` smooths the movement by referencing a previous frame, creating a natural and dynamic motion effect.

// Connect to the audio amplitude slider
audioLevel = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");

// Set scaling limits
minScale = 100;
maxScale = 120;

// Define bass threshold for triggering
bassThreshold = 20;

// Smooth the animation
smoothTime = 0.1;
previousValue = thisLayer.scale.valueAtTime(time - smoothTime);

// Control scaling based on audio level
scaleValue = (audioLevel > bassThreshold)
? linear(audioLevel, bassThreshold, 100, minScale, maxScale)
: minScale;

// Final scaling output
[scaleValue, scaleValue]

How to Use This Expression?



Add an Audio Layer: Import your audio file and add it to your timeline.
Create a New Shape or Text Layer: This will be the layer that reacts to the audio.
Apply the Expression:Select the shape or text layer.
Press S to open the Scale property.
Hold Alt (Windows) or Option (Mac) and click the stopwatch icon next to Scale.
Paste the provided expression into the expression editor.

Convert Audio to Keyframes:Right-click on the audio layer.
Go to Keyframe Assistant → Convert Audio to Keyframes.
A new layer named Audio Amplitude will appear.

Connect the Expression: The expression automatically references the Both Channels slider in the Audio Amplitude layer.
Adjust Values: Modify minValue and maxValue in the expression to control the size range of your visual element.
Preview the Animation: Play your timeline to see the layer respond to the audio's volume.

Support Our Mission to Keep It Free

Your contribution ensures ongoing access to high-quality, easy-to-use After Effects expressions and libraries for

everyone.

Trending
Free After Effects Tutorials & Templates

As one of YouTube's leading creators of Motion Graphic Tutorials, we provide a diverse array of resources, including After Effects templates, royalty-free sound effects, and Photoshop PSD Templates. We also offer premium After Effects Templates and Sound Effects, designed to meet the needs of both beginners and professionals in the Motion Graphics field.

Copyright © 2025 Avnish Parker.

All Rights Reserved.

Follow Us

  • Youtube
  • Grey Facebook Icon
  • Twitter
  • Instagram
  • Patreon_logo_Small_edited_edited
Online Payment Icons
bottom of page