(Close)
Forgot password?
Join Now! Watch Tutorials
macProVideo.com
Close

Free Premium Access

Access our entire library of Premium Hub Articles, Project Files and the first 10% of each Tutorial-Video from the Online Tutorial Library.

Create your FREE Account now!

Already a member? Login

Categories

Related Articles

  • After Effects: 13 3D Workflow Tips
  • by Clay Asbury
  • 13 is unlucky for some, but certainly not for all of you After Effects users out there! Clay Asbury, Adobe After Effects expert trainer, reveals 13 of his tastiest tips for working in 3D.
  • MPV FREE Stuff: After Effects Music Video Kit
  • by Toby Pitman
  • Free lunch, free beer, or free After Effects goodies for creating your own music videos… it's not a tough choice when you see what Toby Pitman has created for you!
  • After Effects: Audio Stems To Radio Waves
  • by Toby Pitman
  • From importing audio stems into After Effects through to converting audio to keyframes and using linear expressions, this article has it all. Toby Pitman shares his tips on how to animate audio in AE.
  • After Effects: The Roto brush Tool
  • by Richard Lainhart
  • This excellent tutorial on using Adobe After Effect's Roto brush tool is from the unpublished collection of Hub articles by Richard Lainhart, RIP. This is an essential article on compositing. Enjoy.
  • Create A Lunar Landscape in After Effects CS5.5
  • by Toby Pitman
  • Space. The final frontier? Maybe. In this After Effects step-by-step, there's no need for 'giant leaps' as Toby Pitman (moon) walks you through how to create a realistic lunar landscape.

Related Tutorial-Videos

  • Motion 5 105
  • Animating Effects
  • Got a behavior problem? Motion 5‘s got a solution. Learn how to animate using Behaviors, Keyframing and Tracking with the always animated Motion expert, Michael Wohl...
  • Motion 5 104
  • Effects, Particles and Replicators
  • Motion comes jam-packed with a huge variety of very hot motion graphic effects. This tutorial shows you how to ignite these awesome Filters, Particle Systems and Replicators to fill your frames with kinetic energy and action...
  • Photoshop CS5 404
  • Lighting & Light Effects
  • Join Film Industry Pro Mark Stope as he shows you how to light scenes and create dramatic lighting effects using Photoshop CS5.
  • After Effects CS5 303
  • More Cartoon Animation Basics
  • Learn to use Adobe After Effects' Puppet Pin tool to animate characters in the "squash-and-stretch" style seen in the classic cartoons of the 30s & 50s in More Cartoon Animation Basics by After Effects expert Richard Lainhart...
  • Final Cut Pro X 106
  • Titles, Effects and Compositing
  • Final Cut Pro X incorporates very powerful tools for creating titles, visual effects and complex composite shots. Join star trainer and video editor Michael Wohl, as he explores each of these techniques and shows you how they are created, customized and edited to perfection. So if you're wondering how create stunning effects in FCP X, this tutorial will get you going down the right path!
  • After Effects CS5 302
  • Cartoon Animation Basics
  • Learn how to animate photos and create basic characters in the style of “South Park”, “Monty Python” and “Jib Jab” in this tutorial, Cartoon Animation Basics, by After Effects expert Richard Lainhart.
  • Live 8 202
  • Live's Effects: Plugged In!
  • Join Mo Volans as he takes you on an overview of Live’s amazing bundled plug-ins! This tutorial, filled with tons of audio examples, is a treasure-trove of information on how to use and master all of Live's included effects!
  • After Effects CS5 203
  • Secrets of Particle Playground
  • Learn the little-known secrets of After Effects' Particle Playground plugin with special effects expert & Star macProVideo.com Trainer Richard Lainhart.
  • After Effects CS5 201
  • Motion Tracking and Stabilization
  • Learn the ins-and-outs of After Effects’ Motion Tracking and Stabilization techniques with special effects expert, Richard Lainhart.
  • After Effects CS5 101
  • Core After Effects CS5
  • Adobe’s After Effects CS5 is the industry-leading motion graphics software that powers animations across all media including the web, on TV and in feature films. Join visual artist/musician and macProVideo.com trainer Richard Lainhart in this detailed exploration of everything you need to know about the powerful animation tools in After Effects CS5.
  • Feb 17, 2012
After Effects: More About Expressions (Part 2)
  • Genre: Video
  • Level: Intermediate
  • Time to Complete: 15-30 minutes
  • 0 comments — Start Discussion

Preview these Motion Tutorial-Videos

After Effects CS5 101: Core After Effects CS5 - Play IconAfter Effects CS5 101: Core After Effects CS5 - Preview Video
Final Cut Pro X 106: Titles, Effects and Compositing - Play IconFinal Cut Pro X 106: Titles, Effects and Compositing - Preview Video
Motion 5 105: Animating Effects - Play IconMotion 5 105: Animating Effects - Preview Video

Continuing with some of the concepts we covered in my recent Expressions Basics Quick Tutorial, in this article we'll be looking at using Expressions as a simple and easily tweakable way to tie the amplitude of an audio layer to another layer. In this case, we'll be using a rhythm track to drive the needle of the same kind of VU meter we used in the Expressions Basic tutorial. This time though, because the actual amplitude of the audio track will be directly driving the motion of the meter, the end result will be a realistic and accurate meter VU meter animation. Let's get started.


Step 1 - Create the Meter Comp

We'll start by making a simple meter needle that we can drive with our audio track. We could make something more elaborate, with proper markings and a more realistic needle, or even cut up an actual photo of a meter in Photoshop, but I'll leave those details to you. What we'll show you here is easily translatable to a more realistic image.

To start, drag your audio track onto the Create a New Composition to make a new comp the length of your track. I'm using a short loopable funk bass and drums track:

You can use anything you like, of course.

Next add a new long, narrow Solid to the comp, called Needle. I've made mine 10 pixels wide and 200 pixels high:

needle comp


Then double-click the solid to open it in its Layer window, grab the Pan Behind (Anchor Point) tool, and shift the anchor point for the Needle down to its bottom edge, so the Needle will rotate around its end instead of its middle.


Step 2 - Convert Audio to Keyframes

Next, we need to turn the varying amplitude or level of the audio track into something that we can connect to the rotation of the meter needle. To do this, select the audio track and choose Animation > Keyframe Assistant > Convert Audio To Keyframes. When you do, you'll see a new layer appear in the Timeline window, called Audio Amplitude. Select that and type U (the Über key) to solo the layer's keyframes, and you'll see keyframes for properties called Left Channel, Right Channel, and Both Channels:

Keyframe properties displayed



What Convert Audio to Keyframes has done is analyze the levels in the audio track's channels and created keyframes based on those level changes. It's also added an Expression Slider, which is just an empty control designed to let you link properties to each other, which is just what we need to do. 


Step 3 - Create a Rotation Expression

At this point we could simply select all the keyframes for Both Channels and paste them into the Rotation property for the Needle, which would give us an animation where the Needle follows the track. But tweaking all those keyframes is really a problem if you need to adjust the motion in the layer later  (say if you want to make the needle swings wider). Just pasting the keyframes means that we'd have to adjust each one individually to make a wider swing, test it, adjust again, and so on. And the needle would still be starting at the 12:00 position, because the audio keyframe values don't go below zero. With a real VU meter, the zero amplitude position is more like a 9:00 position or so. However, by linking the Audio Keyframes to the Rotation with an expression, we can easily adjust the way the audio keyframes affect the needle movement, which is the real power of using an expression instead.

So, we first need to create an empty Rotation expression to have something to link to. To do that, type R to solo the Rotation property for the Needle, then option-click the Stopwatch for the Rotation property (option-clicking the stopwatch will add a new expression). When you do, you'll see that the property values for Rotation turn red, meaning they're controlled by an expression, and you'll also see a line of highlighted text in the Timeline saying transform.rotation. You'll also see some additional interface objects appear under the red property values:

additional interface objects


To set this empty expression, just click anywhere outside its text box—we won't be typing anything directly into the expression at this point. Instead, we'll use a much simpler method to create the audio-rotation expression.


Step 4 - Link the Rotation to the Audio Keyframes

Take a closer look at those new interface objects created when we made the new expression, you'll see a little swirly icon - this is the Pick Whip. The Pick Whip lets us link expressions to parameters, which is what we'll do next. 

Click on the Pick Whip for the Rotation expression, and drag from it up to the Slider control for Both Channels in the Audio Amplitude layer: 

Audio amplitude layer


(We're using Both Channels because this is essentially a mono track. If you had a lot of stereo separation in your track, you could use the Left and Right Channel slider controls instead to create stereo meters.)

Once you release the Pick Whip, you'll see a complete expression for the needle Rotation property, telling us that the Rotation property is linked to the Audio Amplitude Slider property:

the Rotation property is linked to the Audio Amplitude Slider property


Enable Motion Blur for the Needle layer and for the comp by clicking their respective buttons, do a quick preview, and you'll see something like this:


As you see, we have a meter that responds accurately to the levels in the audio track, all with just a couple of clicks. But there are some adjustments we should make to improve this, which as I mentioned is where the real power of linking the audio with an expression comes in. 

First, when the track level is low, the meter should start more in the 9:00 position, like a true VU meter, and it would also be nice if the meter's swing were wider. We can do both of those with a couple of simple additions to the expression.


Step 5 - Tweak the Rotation Expression

First, to amplify the range the meter swings, all we need to do is multiply the values coming from the Both Channels Audio Keyframes to give us larger rotation values. To do that, just click on the expression text to enable text entry, and type in "*3"  at the end of the Rotation expression, like so (be sure to click outside the text box to set the new text):

Rotation expression


This multiplies the values coming from the Audio Keyframes by 3, effectively tripling the range of the meter's swing (you should, of course, experiment with different values here depending on your audio source levels.)

Next, click again on the expression to enable text entry, and type in -60 after the *3. This will subtract 60 from the multiplied keyframe values, which will push the meter over towards the 9:00 position when the audio levels are at zero:

Enter these values!


Note: Be sure you enter these values in the order stated—try reversing them to understand why.

Once you have those values in place, another preview should show you something like this:


And there you go: with a simple expression and a little tweaking, you have an animation that would be both tedious and complex to create and adjust with regular keyframing. As always, you should experiment with these concepts on your own to see where they lead you. And above all, have fun!


Preview these Motion Tutorial-Videos

After Effects CS5 101: Core After Effects CS5 - Play IconAfter Effects CS5 101: Core After Effects CS5 - Preview Video
Final Cut Pro X 106: Titles, Effects and Compositing - Play IconFinal Cut Pro X 106: Titles, Effects and Compositing - Preview Video
Motion 5 105: Animating Effects - Play IconMotion 5 105: Animating Effects - Preview Video
Richard Lainhart

Richard Lainhart

Richard Lainhart is an award-winning composer, filmmaker, and author. His compositions have been performed in the US, Europe Asia, and Australia, and recordings of his music have appeared on the Periodic Music, Vacant Lot, XI Records, Airglow Music, Tobira Records, Infrequency, VICMOD, and ExOvo labels. His animations and short films have been shown in festivals in the US, Europe, and Asia, and online at ResFest, The New Venue, The Bitscreen, and Streaming Cinema 2.0. He has authored over a dozen technical manuals for music and video hardware and software, served as Contributing Editor for Interactivity and 3D Design Magazines, and contributed to books on digital media production published by IDG, Peachpit Press, McGraw Hill, and Miller Freeman Books. Previously an Adobe Certified Expert in After Effects and Premiere, a demo artist for Adobe Systems, and co-founder of the official New York City After Effects User Group, he was, from 2000-2009, Technical Director for Total Training Productions, an innovative digital media training company based in New York and California.

Comments

You must be logged in to post a comment.
Create an Account  Login Now

What is macProVideo.com?

macProVideo.com is an online education community featuring Tutorial-Videos & Training for popular Audio & Video Applications including Adobe CS, Logic Studio, Final Cut Studio, and more.
© 2012 macProVideo.com
a division of NonLinear Educating Inc.

About

Our Plans

Tutorials

Community

Help

Legal

Link