Activity › Forums › Adobe After Effects › audio amplitude slider
-
audio amplitude slider
Posted by Marcosh on August 31, 2007 at 2:17 pmHi there,
I created an expression linking the opacity of a layer to a slider in the audio amplitude. I want this layer to react to the beat of the music but I’m finding the frequency too fast… How can I slow down this expression? Is there an easy way to reduce the number of keyframes in the slider? Or should I fix this with an expression?
Thanks!
Marcos H.
Quad G5
2GB RAM
OS 10.4.7
FCP 5.0.4
AE 6.5Markofcain replied 18 years, 8 months ago 4 Members · 5 Replies -
5 Replies
-
Jerzy Drozda jr
August 31, 2007 at 3:14 pmYou can reduce keyframes by applying “The Smoother” (Window > The Smoother), but you may also try using some expressions.
I don’t quite understand what you want to achieve, but you might like these two of my tutorials:
https://library.creativecow.net/articles/drozda_jerzy/SmartVolumeMeter.php
https://maltaannon.com/after-effects/oily-stratum-improving-the-bubble/
maltaannon.com – Free After Effects Video Tutorials and more
-
Mike Clasby
August 31, 2007 at 4:31 pm“I want this layer to react to the beat of the music but I’m finding the frequency too fast… ”
I too don’t quite know what you mean. by “the frequency too fast… ” It reacts to the music, so maybe the music is too fast, if you know what I mean. If you want to reduce the number of keyframes because it’s too jittery, like you said, you can try the flipside of Wiggle… Smooth.
Smooth (2,5)
Here’s an earlier post for the few details available:
https://forums.creativecow.net/readpost/2/911517
I like it better than the Smoother as it easier to change and isn’t destructive (it doesn’t make new keyframes).
Or, if you setup your expression reacting to the slider’s and audio amplitude with linear interpolation, it limits the range the Opacity reacts to. So your Opacity expression would look like this:
minOp = 0; //the lowest opacity you want
maxOp = 100; //the highest opacity you want
minAudio = 0; //the lowest audio level you want a reaction from
maxAudio = 20; //the highest audio level you want a reaction fromFinalOp = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);
linear (FinalOp, minAudio, maxAudio, minOp, maxOp)
Normally you’d set up your maxAudio to whatever the maximum audio reading is on the slider (or flip down the graph to easily see), and the minAudio to zero, but if you real max is 20 and you set the maxAudio to 10 (example above) you’ll clip off that top 10-20 reaction, and similarly if you set minAudio to 5 your Opacity wouldn’t start to change until your audio was 5, so you can limit the reactions easily. Change either as needed.
-
Marcosh
August 31, 2007 at 6:11 pmThanks a lot, guys.
I’m sorry if I wasn’t so clear… because the tempo of the music is so fast, I basically want the movement to occur every other beat.
I’ll try both tips you guys gave me though. I’m sure one of them will work out.
Marcos H.
Quad G5
2GB RAM
OS 10.4.7
FCP 5.0.4
AE 6.5 -
Mike Clasby
August 31, 2007 at 7:16 pmThe fastest way to do what you want is to Time Stretch your Audio Amplitude layer (Layer > Time Stretch.). Time Stretch by 200% will make it twice as slow or half as fast. So now the expression still reads the keyframes but they’re stretched out. You can do the same thing with time remap, but this is easier.
The tempo will be cut in half, but the opacity won’t match the music anymore.
Is that what you want?
-
Markofcain
September 1, 2007 at 1:46 pmThere are perhaps a few different ways to do this. Here is one way:
include a counter in your script at the point where the opacity is changed so that when the number is even change the opacity, if the number is not even continue with the opacity of the last loop:
var beats;
var off_beat;
beats++;
off_beat = beats % 2;if (off_beat) {
// code to change opacity here;
};The logic of this code skips every other beat. disclaimer: untested.
HTH,
Mark Cain
Sarasota, FL USA
Reply to this Discussion! Login or Sign Up