Recently I ran into a problem, where I discovered that Audio Levels in After Effects can’t work with expressions. I had never tried it in all the years I’ve been using AE. But for a tutorial I have planned, in which the video effects the audio, I needed to use expressions to effect my audio levels. While the values seem to be effected, the audio doesn’t actually respond to those changes in values.
So the secret is to use an Audio Effect, and then use the volume controls in that effect with expressions. I posted about it in twitter, and my friend Maltaannon suggested I use the Stereo Mixer effect, and that did the trick. There are other audio effects with which you can do this, but that one is probably best suited for simple volume controls. And if you put an expression on these effects, they respond properly, controlling the audio volume.
And if you want to be really good and proper about it, you should never animate the levels on their own to control volume. They work on decibels and not percentages, which makes it very hard to control in a way that makes sense. Think of it more as a setup tool that should never be animated, even though it can be.
Nick Campbell recently did a tutorial on using Audio in AE that covers all sorts of stuff: How convert your MP3s into AIFF files using QuickTime, the proper way to do fades and cross dissolves using Plugins, and more. You can watch that here.
I also have some tutorials on working with Audio in AE. Check those out here.