Under the Hood of a Dynamic Range Compressor

Under the Hood of a Dynamic Range Compressor

Josh Reiss Centre for Digital Music Queen Mary, University of London www.elec.qmul.ac.uk/digitalmusic/audioengineering/ UNDER THE HOOD OF A DYNAMIC RANGE COMPRESSOR With thanks to Michael Massberg and Dimitrios Giannoulis Questions and Challenges “No two compressors sound alike... each one is inaccurate in its own unique way” – Roey Izhaki, Mixing Audio: Concepts, Theory and Practice Given how a compressor is used, how can you build one? How can you emulate an analog design? What makes compressors sound different? Why do attack and release times mean different things for different compressors? How can you measure the performance of a compressor? What we’re not going to talk about How to use a dynamic range compressor à Preferred parameter settings for different tasks How not to use a dynamic range compressor (Loudness war) à But will show how better design helps prevent misuse Hearing aids à Still applicable, but we’re concerned with compressors for music production, mastering and broadcast Sidechaining and parallel compression Multiband compression Additiona l parameters à Look‐ahead, hold... Introducing the dynamic range compressor map dynamic range of audio signal to smaller range à Reduce signal level of higher peaks while leaving quieter parts untreated à Then (optionally) boosting whole signal to make it as loud as, or louder than, original uncompressed signal Unlike gain, delay, EQ, panning... à Poorly defined Not always agreed what compression parameters do à An adaptive audio effect Action of the compressor depends on the input signal à Nonlinear Generally noninvertible Compressor Controls Threshold‐ T à level above which compression starts Ratio‐ R à determines the amount of compression applied. Knee Width‐ W à Controls transition in the ratio around the threshold Make‐up Gain‐ M à UdUsed to mathtch the outttput sil’ignal’s overall ldloudness to the oriiigina l Attack Time‐ τA à Time to decrease gain once signal overshoots threshold Release Time‐ τR à Time to bring gain back to normal once signal falls below threshold Main components Side‐chain à Level detection xLL[]nyn→ [] Estimate the ‘signal level’ à Decibel conversion yndB[]= 20log10 xn dB [] à Gain compute r xGG[]nyn→ [] Apply threshold, ratio, knee à Timing (Ballistics, Smoothing) xnTT[]→ yn [] Apply attack and release Gain stage yndB[]=++ xncn dB [] dB [] M Output is input multiplied by control vector produced by side‐ chain Level Detection –the options Peak vs RMS à Peak detection ‐ Based on absolute value of the signal ynLL[]= | xn []| à RMS ‐ BdBased on square of the silignal Square of the level is average of square of the input M /2− 1 221 ynLL[]= ∑ xnm [− ] M mM=− /2 Or Square of the level is smoothed estimate of square of the input 222 yLLL[](1)[1][]n =−ααy nxn −+ Exponential Moving Average Filter yn[]= α yn [−+− 1](1α )[] xn Also known as smoothing filter, one pole low pass filter... Step response n y[]nxnn= 1−=≥α for [] 1, 1 Time constant ‐ time it takes a system to reach 1‐1/e= 63% τ fs −1 of its final value yf[]1ταs = −=− 1e → α = e−1/τ fs Issues with RMS level detection Introduces significant delay Introduces additional parameter, M or τ Several studies suggest general behaviour is the same for peak & RMS detection à F. Floru, "Attack and Release Time Constants in RMS‐Based Feedback Compressors," Journal of the Audio Engineering Society, vol. 47, pp. 788‐804, OtbOctober 1999. à J. S. Abel and D. P. Berners, "On peak‐detecting and rms feedback and feedforward compressors," in 115th AES Convention, 2003. The Gain Computer Static Compression Curve 0 -5 Knee Width dB) ( -10 G y -15 -20 -25 Make-up No compression -30 Gain 5:1 compression, hard knee 515:1 compress ion, so ftkft knee -35 -40 Threshold -45 -45 -40 -35 -30 -25 -20 -15 -10 -5 0 xG (dB) 0 The Gain Computer -5 Knee Width (dB) -10 G y -15 -20 -25 Make-up No compression -30 Gain 5:1 compression, hard knee 5:1 compression, soft knee Compression ratio -35 -40 Threshold à Hard knee xTG − -45 RforxT= G > -45 -40 -35 -30 -25 -20 -15 -10 -5 0 x (dB) yTG − G ⎧ xGGxT≤ yG = ⎨ ⎩TxTRxT+ ()/GG−> à Soft knee Linear interpolation (bad) ⎧ xGG2(xT− ) <− W ⎪ yGG= ⎨TW−+−++/2 ( x TW /2)(1 1/ R )/2 2|( x G −≤ T )| W ⎪ ⎩ TxTR+−()/GG 2() xTW −> Second order interpolation (good) ⎧ xGG2(xT− ) <− W ⎪ 2 yGG= ⎨x+−−+(1 / R 1)( xTW G / 2) / (2 W ) 2 | ( xT G −≤ ) | W ⎪ ⎩ TxTR+−()/GG 2() xTW −> Time constants From the smoothing filter Officially, time it takes a system to reach 1‐1/e= 63% of its final value à τA – level starts at 0, goes to 1. Attack time is the time it takes for level to reach 0.63. à τR – level starts at 1, goes to 0. Release time is the time it takes for level to reach 1‐0.63=0.37. But some compressors, à Miscalculate it à Define it as time to go from 90% of initial value to 10% of final value à Define it as time to change level by so many dBs à ... Analog Peak Detector RA C RR à Assuming ideal diode, ynTRT[]= α yn [−+− 1](1α A )max([] xn TT − yn [ − 1],0) Where τA=RAC and τR=RRC −−1/ττA fsRs 1/ f α AR= ee,α = à Used in DD.. BBerners,erners, "Analysis of DDynamicynamic Range Control ((DRC)DRC) DDevices,evices," Universal Audio WebZine, vol. 4, September 2006. P. Dutilleux and U. Zölzer, "Nonlinear Processing, Chap. 5," in DAFX ‐ Digital Audio Effects, U. Zoelzer, Ed., 1st ed: Wiley, John & Sons, 2002 Analog Peak Detector 1.0 Input signal 0.9 PkdttPeak detector, 50ms re lease time Peak detector, 200ms release time 0.8 Peak detector, 500ms release time 0.7 e 0.6 0.5 Voltag 0.4 0.3 0.2 0.1 0.0 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 Time (sec) n−1 m 1−ατAR yn[]=− (1αααARA )∑ ( + − 1) → ≈ Step response m=0 2 −α RARA−+αττ correct peak estimate only when release time is considerably longer than attack time attack time gets slightly scaled by release time à faster attack time than expected when we use a fast release time Decoupled Peak Detector _ RA + CA CR RR yn11[]=− max([], xTR nα yn [ 1]) ynTAT[]= αα yn [− 1](1+ − A ) yn1 [] attack envelope is now impressed upon release envelope good estimate of actual release time given by adding attack time constant to release time constant Branching Peak Detector ⎧ααATyn[− 1](1+− A ) xn T [] xn T [] > yn T [ − 1] ynT []= ⎨ ⎩ α RTyn[[1]−1][][ xn T [][1]≤−≤ yn T 1] Easily accomplished in digital implementation G. W. McNally, "Dynamic Range Control of Digital Audio Signals," Journal of the Audio Engineering Society, vol. 32, pp. 316‐327, May 1984. U. Zolzer, Digital Audio Signal Processing, 2nd ed.: John Wiley and Sons, Ltd., 2008. Time constants in decoupled & branching peak detectors 1.0 0.9 Input Signal Decoupled, τA=100ms, τR=200ms Branching, τ =100ms, τ =300ms 0.8 A R Decoupled, τA=100ms, τR=100ms Branching, τ =100ms, τ =200ms 0.7 A R 0.6 al Level nn 050.5 Sig 0.4 0.3 0.2 0.1 0.0 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 Time (sec) Output of decoupled and branching peak detector circuits for different release time constants à branching peak detector produces intended release time constant à decoupled peak detector produces measured time constant ~ τA+τR. Smooth, level corrected peak detector Smooth decoupled peak detector yn11[]==+ max([] xnTR,αα yn[1](1)[]) [− 1](1+ − RT ) xn []) ynTAT[]=−+−αα yn [ 1](1 A ) yn1 [] ShSmooth bhibranching peak detector ⎧ααA ynTATTT[− 1](1+− ) xn [] xn [] > yn [ − 1] ynL []= ⎨ ⎩ααRTyn[− 1](1+− R ) xn T [] xn T [] ≤ yn T [ − 1] à Used in P. Dutilleux, et al., "Nonlinear Processing, Chap. 4," in Dafx:Digital Audio Effects, 2nd ed: Wiley, 2011, p. 554. U. Zolzer, Digital Audio Signal Processing, 2nd ed.: John Wiley and Sons, Ltd., 2008. Comparison of Digital Peak Detectors All envelopes reach maximum peak value and feature similar attack trajectories Release envelopes too short for decoupled and branching peak detectors smoothed versions make full use of release time Discontinuity for smooth, branching peak detector abrupt switch from attack to release à release envelope is continuous for smoothed, decoupled peak detector 1.0 0.9 1.0 Inset 0.8 090.9 0.7 0.6 0.8 0.25 0.30 0.35 Level ll 0.5 Input Decoupled Signa 0.4 Branching Decoupled, smooth 030.3 BhiSthBranching, Smooth 0.2 0.1 0.0 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 Time (ms) Feedforward or feedback design Feedforward ycxdB=+ dB dB yTxTRdB=+()/ dB − → cRxTdB= (1 /−− 1)( dB ) Feedback ycxdB= dB+ dB yTxTRdB=+()/ dB − → cRyTdB= (1−− )( dB ) à Limiter (ratio of ∞: 1) needs infinite negative amplification à Not designed for look‐ahead Sidechain configuration x []nyn→ [] à Level detection LL yn[ ]= 20log xn [ ] à Decibel conversion dB10 dB à Gain computer xGG[]nyn→ [] xn[]→ yn [] à Timing (Ballistics, Smoothing) TT Timing Placement‐ linear domain xnTL[]= yn [] xGL[]nyn= 20log10 [] cndB[]= ynxnM G []−+ G [] R. J. Cassidy, "Level Detection Tunings and Techniques for the Dynamic Range Compression of Audio Signals," in 117th AES Convention, 2004. J. S. Abe l and D.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    38 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us