motion graphics eXchange
top

Ducking Audio Preset/Expression

Thumbnail for: Ducking Audio Preset/Expression
A great time-saving preset to "duck"(fade in/out) a music layer based on a voice over.
"Ducking - Audio Terms Explained - Process of automatic compression, eg when the announcer's voice signal causes the level of music to be attenuated."(from lp2cd.com)
After Effects CS3
Useful things
Presets (ffx)

Views: 7685
Permalink
visit |  download |  share this  error? 
Just get your audio layers together.
Use "Convert Audio to Keyframes" for the voice over audio layer.
Apply the preset to the bg audio layer, choose the correct "Audio Amplitude Layer" in the control and adjust the settings to your liking.

If you don't want to use the preset, apply the audio effect -> Stereo Mixer to your bg audio layer, Alt-Click the stopwatch on the "Left Level" and paste the whole expession. Then pick-whip the right level to the left one.
//////////// by Nathan Gambles ////////////////////////////////////
sourceAmp = effect("Audio Amplitude Layer")("Layer").effect("Both Channels")("Slider");
// if you use a plugin like Trapcode SoundKeys like that value here.

holdTime = 5
threshold = 15;
audPerc = 70;
fadeInTime = 10;
fadeOutTime =10;

//if using expression controls, uncomment the next lines
//Connecting all the Expression Controls

//holdTime = effect("Padding")("Slider");
//threshold = effect("Threshold")("Slider");
//audPerc = effect("Volume Fade Percent")("Slider");
//fadeInTime = effect("Fade In Frames")("Slider");
//fadeOutTime = effect("Fade Out Frames")("Slider");

function fIn( sAmp, thresh, hT, fiT){             
   nextAud = null;
   myFrame = timeToFrames( );
   while( myFrame <= timeToFrames( ) + hT + fiT ){
      if ( sAmp.valueAtTime( framesToTime( myFrame )) >= thresh){   
         nextAud = myFrame;
         break;
      }else{
         myFrame += 1;
      }
   } 
   if ( nextAud == null ){
      ansI = 0;
   }else{
      ansI = linear( time, framesToTime( nextAud - hT - fiT), framesToTime(nextAud - hT), 0, 100 )
   }
   return ansI; 
}

function fOut( sAmp, thresh, hT, foT ){        
   lastAud = null;
   myFrame = timeToFrames( );
   while( myFrame >= timeToFrames( ) - hT - foT ){
      if ( sAmp.valueAtTime( framesToTime( myFrame )) >= thresh){
         lastAud = myFrame;
         break;
      }else{
         myFrame -= 1;
      }
   }
   if ( lastAud == null ){
      ansOut = 0;
   }else{
      ansOut = linear( time, framesToTime(lastAud + hT), framesToTime( lastAud + hT + foT), 100, 0 )
   }
   return ansOut;
}

//////////////////////////////////////////////

ansO = fOut (sourceAmp, threshold, holdTime, fadeOutTime);
ansI = fIn(sourceAmp, threshold, holdTime, fadeInTime );

percent = Math.max( ansO, ansI ) / 100 ;   

//100 - audPerc * percent + value; // if your intal value is 0%
100 - audPerc * percent // if your intal value is 100%
by ngambles, http://www.ngambles.net

Keywords

Audio, Music, Voice, AudioDucking

(Min. Version: After Effects CS3, Category: Useful things, Type: Presets (ffx))
posted by MicGyver on Oct 25, 2009

 

Related topics:

Product, Service or App Promotion

Thumbnail for: Product, Service or App Promotion
After Effects Template. Promote your app, product or service
After Effects CS5
Useful things
Projects (aep)

Views: 18872
Permalink
posted by RedSpikeFx on Oct 30, 2012

Audio Reactant Time Remapping

Thumbnail for: Audio Reactant Time Remapping
After Effects 6
Other
Video-/Tutorials

Views: 5697
Permalink
posted by francoisgfx on Oct 10, 2010

Eran Stern: Text Trick Part 1

Thumbnail for: Eran Stern: Text Trick Part 1
In this video tutorial, Eran Stern reveals the first text trick in his series and shows how to design an audio waves animation with the After Effects Text Tool.
After Effects 7
Text-FX
Video-/Tutorials

Views: 4291
Permalink
posted by MaxX on Jan 31, 2009


 

 

follow us on http://twitter.com/mgxchangegoogle+get in touch on facebook

 

 

Full length video training series presented by motion graphics industry professionals. Click here to visit Motionworks website!