Many times, you will want to connect a sound to the property of a layer. Maybe it is voice-over connected to the opening of the mouth, maybe it is a car’s speed with the volume of the car sound. In this movie, author Luisa Winters demonstrates how to connect sound and the property of a layer together in Adobe After Effects.
- Many times we want to connect sound to the property of a layer. Maybe it is voice over connected to the opening of the mouth. Maybe it is a car's speed with the volume of the car's sound. In this case, we're going to connect the scale of a heart graphic with the sound of a heartbeat. Let's go ahead and open composition 2.4 music amplitude. In here, if you play it, you're gonna hear a heartbeat. You're also going to see a graphic heart.
You're gonna see two layers here in the timeline, but that are not visible in the composition. A ball and a heart. Let's go ahead and select the heartbeat layer. Now you can go to Animation, Keyframe Assistant, and you can convert the audio to keyframes. By clicking in there, what you are doing is that you're creating a null object. Which is named audio amplitude, that has a ton of keyframes already assigned to them.
So select that layer and press the letter U and you're going to see that there is a left channel slider, a right channel slider, and a both channel slider, and the both channel slider, which have slightly different values depending on where it is that you are. I'm gonna go ahead and collapse the left and the right channels, and I'm going to leave only the slider for the both channels available. I'll select the heart layer and press S for scale, and let's go ahead and add an expression to this.
You can now pick whip to the both channels slider, and your connection will be created. If you play this, you're going to see that indeed, the heart is becoming larger and smaller to the rhythm of the heartbeat. However, this is not large enough. Let's go ahead and make this a little bit taller, and this a little bit taller as well. Now I can't have the scale of the heart be this small, 0.2, but it is indeed following the value of the slider.
All I have to do is add some value here, and I'm gonna add 100 so that the smallest that it can possibly be is 100 as in percent. So plus 100 and there you have it. If I play it now, you see that it's a little bit better. Now, let's go ahead and make the heart invisible and make the ball visible. In the ball layer, press the letter P for position, and let's go ahead an add an expression to the position parameter.
Notice that this position already has keyframes assigned to them. So alt or option and click on the stopwatch. Now I'm gonna go from the X position to the slider, and it indeed is following what the heartbeat is doing. Let's go ahead and undo that. Instead of the X position, now add an expression to the Y position. Notice that we no longer have the expression on the X, and now pick whip the same slider, and now notice what is happening.
You see that the layer is still moving left to right, but it's going up and down to the rhythm of the heartbeat. All I have to do is add a value here to center the layer to what it was, but I'm not sure what value to add. Let's go ahead and disable the expression. 540, and if I enable the expression I get zero. I need to go from zero to 540. This is really easy. Add 540, and now you're going to see that the ball is going up and down to the rhythm of the heartbeat.
Let's go ahead and make the ball invisible and the heart letters visible. Let's go ahead and add an animator four position to this text. Animate position, and we are going to add an expression to this position. We're going to connect it to the both channels slider. Let me make this a little bit taller so we can see it, and now I can connect this to this.
Alright, if I play this you see that indeed it's moving the position just like it should. Now if in addition to that you add a wiggly selector, now the changes will happen a little bit more randomly. If you wanna add more of a change here at the end, all you have to do is multiply by any value that you want.
Let me go ahead and make this a little bit taller so I can see it better. And we're gonna multiply this maybe by three. So right before the semi colon, asterisk three, and now the changes will be quite a bit more. If I wanted to add this only to the Y value of the word heart, I could do that by using variables. So let's go ahead and do that. The variables are already created for me, so I'm gonna replace the first temp with the X value, and now I'll play it again, and as you can see, only the Y position of the letters are being effected by the heartbeat.
Connecting audio to different properties is fun and easy to do. You can be extremely effective by connecting your animations to audio.
- Adding expressions
- Editing expressions manually
- Changing expression dimensions: rate, value, music amplitude, etc.
- Working with expression variables
- Using the Expression Language menu
- Using random values