dynamic range control
dynamic range control is the adaptive adjustment of the dynamic range of a signal. the dynamic range of a signal is the logarithmic ratio of maximum to minimum signal amplitude specified in db.
you can use dynamic range control to:
match an audio signal level to its environment
protect ad converters from overload
optimize information
suppress low-level noise
types of dynamic range control include:
dynamic range compressor –– attenuates the volume of loud sounds that cross a given threshold. they are often used in recording systems to protect hardware and to increase overall loudness.
dynamic range limiter –– a type of compressor that brickwalls sound above a given threshold.
dynamic range expander –– attenuates the volume of quiet sounds below a given threshold. they are often used to make quiet sounds even quieter.
noise gate –– a type of expander that brickwalls sound below a given threshold.
this tutorial shows how to implement dynamic range control systems using the , , , and system objects from audio toolbox™. the tutorial also provides an illustrated example of dynamic range limiting at various stages of a dynamic range limiting system.
the diagram depicts a general dynamic range control system.
in a dynamic range control system, a gain signal is calculated in a sidechain and then applied to the input audio signal. the sidechain consists of:
linear to db conversion:
gain computation, by passing the db signal through a static characteristic equation, and then taking the difference:
gain smoothing over time:
addition of make-up gain (for compressors and limiters only):
db to linear conversion:
application of the calculated gain signal to the original audio signal:
linear to db conversion
the gain signal used in dynamic range control is processed on a db scale for all dynamic range controllers. there is no reference for the db output; it is a straight conversion: . you might need to adjust the output of a dynamic range control system to the range of your system.
gain computer
the gain computer provides the first rough estimate of a gain signal for dynamic range control. the principal component of the gain computer is the static characteristic. each type of dynamic range control has a different static characteristic with different tunable properties:
threshold
–– all static characteristics have a threshold. on one side of the threshold, the input is given to the output with no modification. on the other side of the threshold, compression, expansion, brickwall limiting, or brickwall gating is applied.ratio
–– expanders and compressors enable you to adjust the input-to-output ratio of the static characteristic above or below a given threshold.kneewidth
–– expanders, compressors, and limiters enable you to adjust the knee width of the static characteristic. the knee of a static characteristic is centered at the threshold. an increase in knee width creates a smoother transition around the threshold. a knee width of zero provides no smoothing and is known as a hard knee. a knee width greater than zero is known as a soft knee.in these static characteristic plots, the expander, limiter, and compressor each have a 10 db knee width.
gain smoothing
all dynamic range controllers provide gain smoothing over time. gain smoothing diminishes sharp jumps in the applied gain, which can result in artifacts and an unnatural sound. you can conceptualize gain smoothing as the addition of impedance to your gain signal.
the expander
and noisegate
objects have the same
smoothing equation, because a noise gate is a type of expander. the
limiter
and compressor
objects have the same
smoothing equation, because a limiter is a type of
compressor.
the type of gain smoothing is specified by a combination of attack time, release time, and hold time coefficients. attack time and release time correspond to the time it takes the gain signal to go from 10% to 90% of its final value. hold time is a delay period before gain is applied. see the algorithms of individual dynamic range controller pages for more detailed explanations.
smoothing equations
expander
and
noisegate
αa and αr are determined by the sample rate and specified attack and release time:
k is the specified hold time in samples.
ca and cr are hold counters for attack and release, respectively.
compressor
and
limiter
αa and αr are determined by the sample rate and specified attack and release time:
gain smoothing example
examine a trivial case of dynamic range compression for a two-step input signal. in this example, the compressor has a threshold of –10 db, a compression ratio of 5, and a hard knee.
several variations of gain smoothing are shown. on the top, a smoothed gain curve is shown for different attack time values, with release time set to zero seconds. in the middle, release time is varied and attack time is held constant at zero seconds. on the bottom, both attack and release time are specified by nonzero values.
make-up gain
make-up gain applies for compressors and limiters, where higher db
portions of a signal are attenuated or brickwalled. the db reduction
can significantly reduce total signal power. in these cases, make-up
gain is applied after gain smoothing to increase the signal power.
in audio toolbox, you can specify a set amount of make-up gain or
specify the make-up gain mode as 'auto'
.
the 'auto'
make-up gain ensures that a 0 db input
results in a 0 db output. for example, assume a static
characteristic of a compressor with a soft knee:
t is the threshold, w is the knee width, and r is the compression ratio. the calculated auto make-up gain is the negative of the static characteristic equation evaluated at 0 db:
db to linear conversion
once the gain signal is determined in db, it is transferred to the linear domain: .
apply calculated gain
the final step in a dynamic control system is to apply the calculated gain by multiplication in the linear domain.
example: dynamic range limiter
the audio signal described in this example is a 0.5 second interval of a drum track. the limiter properties are:
threshold = –15 db
knee width = 0 (hard knee)
attack time = 0.004 seconds
release time = 0.1 seconds
make-up gain = 1 db
to create a limiter
system object™ with these properties, at the matlab® command prompt,
enter:
drl = limiter('threshold',-15,... 'kneewidth',0,... 'attacktime',0.004,... 'releasetime',0.1,... 'makeupgainmode','property',... 'makeupgain',1);
this example provides a visual walkthrough of the various stages of the dynamic range limiter system.
linear to db conversion
the input signal is converted to a db scale element by element.
gain computer
the static characteristic brickwall limits the db signal at –15 db. to determine the db gain that results in this limiting, the gain computer subtracts the original db signal from the db signal processed by the static characteristic.
gain smoothing
the relatively short attack time specification results in a steep curve when the applied gain is suddenly increased. the relatively long release time results in a gradual diminishing of the applied gain.
make-up gain
assume a limiter with a 1 db make-up gain value. the make-up gain is added to the smoothed gain signal.
db to linear conversion
the gain in db is converted to a linear scale element by element.
apply calculated gain
the original signal is multiplied by the linear gain.
references
[1] zolzer, udo. "dynamic range control." digital audio signal processing. 2nd ed. chichester, uk: wiley, 2008.
[2] giannoulis, dimitrios, michael massberg, and joshua d. reiss. "digital dynamic range compressor design –– a tutorial and analysis." journal of audio engineering society. vol. 60, issue 6, 2012, pp. 399–408.
see also
| | | | | | |