One of the most fun and useful things in Adobe After Effects, is linking the motion of your project components with music. In this tutorial, Hassan Marji shows users how to create a 'volume metre' that responds to their music.
Step one: creating the volume metre
1. Create a 400*400 composition. Import three solids: red, yellow, and green, each the size of 70*90 and arrange them as a volume metre.
2. To give it the look of real volume metre, we will precompose the three solids, by selecting them, and pressing Ctrl+Alt+C and choose the option "move all attributes into the new composition" and name it volume metre.
3. Import a new solid the size of the composition and lay it over our new pre-composition. On this new solid we'll apply the grid effect, from the generate group. Give the border the value 4, and the corner the value -60, 227, so there are no vertical lines over our volume metre.
4. Change the track matte of the volume metre layer to "Alpha inverted matte".
5. Precompose the two layers again, and name them (final volume metre) and apply the Glow Effect from the Stylize group and you will get the look of.
Step two: moving it
6. We need this volume metre to respond to music, so import a sound file, drag it to time line, and then right click it. From key frame assistant choose "convert audio to keyframes" and you'll have a new layer called "Audio Amplitude".
Click the small triangle on the next to the layer, choose effects, then click the triangle next to "both channels" you'll see a stop watch next to the word "slider". keep it opened, because we'll need it soon.
7. On the volume metre layer, apply the linear wipe effect from the transition group, make the wipe angle 180.
8. Alt click the stop watch of the "transition complete" and drag the pick whip from transition complete to the slider in the Audio Amplitude Layer: You'll notice that this is not the result you wanted as the red area is moving slowly and in the opposite direction.
9. Let's correct this by going to the transition complete, where we see the following expression written: thisComp.layer("Audio Amplitude").effect("Both Channels") ("Slider") Press the expression -so you can edit it- and at the end of it write *-2+100, so our new expression will be: thisComp.layer("Audio Amplitude").effect("Both Channels") ("Slider")*-2+100 Idifferences by multiplying them.. you can try other numbers, but the result will be very extreme and not realistic.
Hassan Marji is senior certified Adobe instructor and principal instructor at Applied Digital Media Services, Dubai.
When we gave a transition angle of 180, we meant that we wanted the transition to be from top to bottom, then we linked it to the audio keyframes. The problem with those keyframes is that when there is no sound, they have the value of zero, and they have greater value when the sound is louder.
So, by adding 100 to the transition, it means the transition has a 100% value when there is no sound, by multiplying it with a minus number, it moves. Let's say that the music keyframe has the value of three, the result of the transition will be: 3*-2+100=94.
Why -2 and not -1? Because the differences between keyframes values are very small, so we have to 'amplify' these differences by multiplying them.. you can try other numbers, but the result will be very extreme and not realistic.