FORUMS: list search recent posts

Audio markers to control levels

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Olly Bea
Audio markers to control levels
on Jan 16, 2012 at 10:06:10 am

Hey all, 3 pronged this.....

I would like to set markers on my audio layer that will drive its volume.

So for example I have a clip that comes in with a voice over and I would like the background audio bed to drop down quiet whilst the voice is on and then when the voice over has finished the bed comes back up again, but I would like to drive this by markers as opposed to keyframes. ("In" and "Out" markers). This will happen multiple times over the course of the programme.

I would also like a slider to control how quiet the audio drops to again rather than keyframing this in, so I vary this as I need.

Finally, I would like the audio to fade down to its quiet level over an number of keyframes but I would like to be able to control this number again with a slider....

I have no clue how to do this, could anyone help? Is this even doable?

Cheers, Olly



Return to posts index

Dan Ebberts
Re: Audio markers to control levels
on Jan 16, 2012 at 5:10:30 pm

I think this will work for what you want. At odd-numbered markers, it ramps the audio level down by the decibels specified by the fadeAmt slider over the number of frames specified by the fadeFrames slider. At even-numbered markers, it ramps back to the pre-expression value.


fadeFrames = effect("Fade Frames")("Slider");
fadeAmt = effect("Fade Amount")("Slider");

n = 0;
m = marker;
if (m.numKeys > 0){
n = m.nearestKey(time).index;
if (m.key(n).time > time) n--;
}

if (n > 0){
t1 = m.key(n).time;
t2 = t1 + framesToTime(fadeFrames);
if (n%2)
linear(time,t1,t2,value,value-[fadeAmt,fadeAmt])
else
linear(time,t1,t2,value-[fadeAmt,fadeAmt],value);
}else
value



Dan



Return to posts index

Olly Bea
Re: Audio markers to control levels
on Jan 16, 2012 at 5:23:23 pm

Has anyone told you that you are a genius!



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]