Handbook for Sound Engineers

(Wang) #1

972 Chapter 25


good and concise map, or set of maps for various
changes in parameters, and then to move the threshold
around by scaling up and down the actual audio samples
accordingly. In particular, expansion curves can be
created economically of memory; instead of moving the
curves around, the audio is scaled instead to create the
desired response.
A peak limiter, operating over a comparatively
much reduced dynamic range, may possibly eschew a
log convertor and just look up directly. On the other
hand, an expander may have to adequately describe
down to 90 dBFS (or whatever the “don’t care” level
might be). Which brings to the fore another point,
which is that if different time constants are required for
different functions, as they certainly would be between
a compressor and a gate, say, it could make sense to use
a different look-up table for each.


25.22.2 Literal Dynamics


This is the technique of emulating (as close as one can)
how an analog circuit achieves the required dynamic
behavior. There is a bit more art in this approach, and
although the algorithms tend to be longer and certainly
more intensive than mapping, there is very little
memory usage, and changing parameters just involves
sending a handful of coefficients to the DSP from the
host, rather than potentially thousands.
It is possible to emulate the rough-and-tumble
free-for-all uncontrolled servo-loop behavior of a feed-
back-style compressor/limiter, or alternatively plod
through the tidy-mind deterministic feed-forward VCA
approach, which involves division and/or much loging,
antilog’ing, and untold processor time (transcendental
functions are very long-winded in DSP), for ultimately
a well-behaved but, frankly, bland result. (Guess which
the author finds more fun?) Filling a whole DSP with
such a VCA-like processor isn’t difficult.
There is just as much latitude for approach with literal
dynamics as there necessarily has been with analog
design; indeed, if one’s goal is to emulate classic analog
dynamics this is really the only way to go.


25.22.2.1 A Simple Digital Limiter


Fig. 25-142 highlights how dynamics signal processing
in DSP—in this case a simple peak limiter—can almost
slavishly follow an analog architecture.
The key to the limiter’s operation is the gain-reduc-
tion value—sorry, the author still thinks of this as a
control voltage. Remember that multiplying a signalco-
efficients by 1 doesn’t change the signal; multiplying by


a fraction less than 1 reduces the output signal—i.e.
affects gain reduction, which is what we need when a
limiter is biting.
First, the immediate present (new) sample is multi-
plied (MPY) by the stored GR-generated last sample.
This is necessary to judge whether and which way this
last GR value needs to be adjusted for the present
sample. The absolute value (ABS) of this modified
input sample is then compared (CMP) to the threshold
coefficient. If it is greater than the threshold the GR
value needs to be reduced, and the program branches
into attack, where the old GR value is multiplied by a
coefficient usually just slightly less than 1. Likewise, if
the threshold isn’t breached the GR value can be
relaxed, so it branches off to release, where it is in effect
multiplied by a coefficient just ever so slightly greater
than 1. This is shown in the diagram as switching
between using the attack coefficients, or the release
coefficients. Naturally, the modified GR value has to be
clamped such that it can’t rise higher than 1 (and so no
longer be GR!) and that is also the normal unity
“resting” case.
The coefficients for attack and release are in this
simplistic case (it can get considerably more complex!)
multiplicative—the GR value is changed by the same
proportion or, in other words, the same number of frac-
tional dB per sample. Running at, say, a 48 k sample
rate, in order to have a 1 dB/s release rate the coefficient
would have to represent 1/48,000 dB increase in GR

Figure 25-142. Flow chart of a simple digital limiter.

Input

Threshold

Attack

Release

GR min

GR max

i

i = 0 dB

0.03162
New GR
Output MPY
Input × GR

= –30 dB

GR storage

if < GR max
make GR max

if > GR min
make GR min

MPY GR × Coe

CMP compare

ABS absolute

Old GR

MPY input × old GR

i

GR = gain reduction
Free download pdf