Quantcast
Channel: Adobe Community : Popular Discussions - After Effects Expressions
Viewing all articles
Browse latest Browse all 47983

Creating an expression to drive a Gain Reduction Meter

$
0
0

Hi everyone,

 

 

 

 

    I am faced with a bit of a conundrum, and would appreciate some help from the collective wisdom here.

 

 

     Presently I am making an audio compressor animation for instructional purposes.  This compressor features a pair of VU meters.  One for level, which works the way most folks are accustomed to seeing VU meters operate, where the needle bounces in an arc from left to right, with the left most point representing silence, and the right most point of travel indicating the peak of the audio level.  I have written an expression that accomplishes this behavior quite nicely:

 

 

r=thisComp.layer("Audio Amplitude 2").effect("Both Channels Smooothed")("Slider")*effect("multiplier")("Slider")+effect("offset") ("Slider");

clamp(r,-38,65)

 

 

   I am not, however, having much luck in making such a setup for the second meter, which is to be a Gain Reduction meter.  This meter works differently than a level meter in that the needle instead hovers at a position analogous with 1 o'clock, and moves to the left only when the audio has passed a certain level and the compressor kicks in.  The amount of left travel (done via rotation with an anchor point at the bottom of the needle) coincides with the amount of attenuation the signal receives based on the compressor's settings.

 

 

    This GR meter then, has very little movement, and is only occasionally triggered.  I thought the minimal movement would be easy to hand-key, but this has turned out to be a tedious and time-consuming process.  I feel there simply must be a way to achieve this with an expression.

 

 

    Any help is greatly appreciated,

 

 

     - Will


Viewing all articles
Browse latest Browse all 47983

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>