Consoles 971
in order to create the desired output level. The map can
contain the transfer values for many different sorts of
dynamics processing simultaneously—say, compression
and gate, limiter and expander, etc. Fig. 25-75 in the
earlier discussion of dynamics gives a clue as to the
structure of such a map.
Literal is building a digital processing equivalent of
how one would literally achieve the processing in good
old analog.
For all the fuss that is made about how DSP makes
doing audio design harder, it’s nice to come across
aspects that make life so much easier and nicer. Here are
two:
- A machine language mnemonic for ABSolute value.
The effect is to look at a number and if it’s negative,
make it positive. It’s the DSP equivalent of a preci-
sion rectifier, never the most trivial of analog design
exercises. - MPY (Multiply)—This is the most perfect, distor-
tion-free, vice-free gain-control element. One will
never, ever, want to play with VCAs or FETs again.
25.22.1 Mapping Dynamics
Look-up table dynamics have the strong property of
being very fast in terms of processing cycles at the
expense of the memory for an adequate map or set of
maps. The precalculation has already been done, so all
that needs to occur is the indexing of the look-up table
from the value of the input signal—returned is the
gain-control value—very short and to the point.
Depending on the dynamic range over which the
dynamics is to behave, the depth to which (how low in
level) the dynamic behavior is to be adequately
described (important for gates, expanders) and impor-
tantly the degree of resolution of the table (so that signal
levels don’t noticeably lurch from one value to the
next), the size of the tables can get quite healthy. In
addition, it is often convenient to actually run more than
one table. Required memory usage may or may not be a
problem—some DSPs have huge rafts of memory, while
others, designed for less memory-intensive streaming
audio applications, may have only just enough for the
basics.
The map only describes the instantaneous gain value.
Direct application of recovered gain values would result
in awful distortion. Obviously some temporal
constraints need to be added. Typically these are the
classic dynamics values of attack and release and such.
Where these time constants are applied is an interesting
question. In order to use the usually relatively slow
release time constant to smooth out the inevitable steps
from the table quantization, this usually follows the
look-up. If one were to be emulating a peak limiter, then
one might well let the input signal directly pick its value
from the table and then apply the usual short attack time
constant to that. In other words, for a limiter, both attack
and release would follow the look-up stage.
Compressors generally have a far more relaxed
attack time, with the intention of deriving a signal more
corresponding to the audio energy than its instantaneous
peak. In this case the attack processing would take the
form of short(ish)-term averaging or even rms-like
detection; the result of this averaging would be used as
the pointer into the look-up table. The release would be
left on the output of the look-up, mostly for its role as
janitor, tidying up the potentially ragged steps.
Assuming a compressor, a likely threshold range
would be from 40 dB below nominal operating level
up to, say, 10 dB above. Since nominal operating level is
usually at or around 20 dBFS, this implies that the
look-up table has to encompass an input signal range of
10 dBFS down to 60 dBFS. It has to do this with
sufficient resolution that no gain lurches are obvious.
(Although most musical program material can withstand
even comically large gain lurches under these circum-
stances, some—solo flute or a slowly decaying tremolo
bass-guitar note spring to mind—will highlight painfully
small ones.) Since the gain steps should almost certainly
be dB linear or close to it, and the applied signal is
linear, it is wise to perform a logarithmic conversion to
the input signal to closer approach dB-to-dB mapping in
the table. These tend to be computationally expensive or
iinvolve look-up tables themselves (!), but the penalties
for not prelogging are either a look-up table to achieve
adequate resolution at the lower levels (and 60 dBFS is
a long way down, to 1/1000 in fact) or reduced accuracy
at the lower levels for a smaller map. A linear map for
this compressor might need to be 2048 or 4096 steps
deep to have nonembarrassing behavior near the bottom.
Big tables, actually big anythings, are bad news in
the sense that if the parameters are changed (say the
compression ratio is altered a notch) a whole whacking
great new table has to be fed from the host microcon-
troller up to the DSP. The alternative, if the memory in
the processor supports it, is to permanently have a suite
of maps encompassing the range of parameters required.
A different map is pointed to when a parameter
changes. LOTS of memory!
A nice lateral thought solution to the really deep map
problem affords itself with the use of floater
(floating-point) processors. (Actually, it can be and is
applied in literal approaches, too.) This is to create a