Beruflich Dokumente
Kultur Dokumente
1060 J. AudioEng.Soc.,Vol.48,No.11,2000November
COMMUNICATIONS DIGITAL CLIPPERS AND COMPRESSORS
attenuation per octave. This can be done only if we ping because the transition takes less time, causing the
can make c(t) continuous in the first derivative. A hard 12-dB per octave slope to persist to correspondingly
clipper cannot do this, but a soft clipper can. There is, higher frequencies. But soft limiting helps significantly
of course, a tradeoff here: a hard clipper produces no with mild clipping such as in the preceding example.
distortion clear up to 0 dB, whereas a soft limiter starts
modifying the signal somewhat below 0 dB, thereby 2 DIGITAL DYNAMIC-RANGE COMPRESSION
reducing the unclipped dynamic range. For instance,
suppose we use the soft-clipping function Although less obvious, digital dynamic-range com-
pressors also generate aliasing. Happily it turns out that
Frequency, Hz
Fig. 1. Level of harmonies for clipped 10-kHz sine wave at several clipping levels. (After Mapes-Riordan [1].)
J. Audio Eng. Soc., Vol. 48, No. 11, 2000 November 1061
KRAGHT COMMUNICATION
sharp contrast to the instantaneous or several-microsec- Hz signal. This is due to the lag between the input and
ond transitions of hard or soft clipping, the detector output. ThiJs during decay the signal is
Fig. 6 shows an enlargement of the compressor gain smaller than the detector's estimate, and so the peaks
for the 17-kHz and 16 995/17 005-Hz signals. The se- and troughs of the signal cause less fluctuation. On the
lection is at the peak of the gain, where the decay ends other hand, during attack there will be more than average
and the attack starts. A constant offset was added to the fluctuation. But the fluctuation and the resulting distor-
17-kHz gain to aid visual comparison. Note that the tion averages are about the same with the 16 995/
gain fluctuates by about 0.1 dB. This is caused by the 17 005-Hz signal as with 17 kHz.
compressor responding slightly to the peaks and troughs As mentioned, this is a worst-case example. The ear
in the 17-kHz input. These rapid gain fluctuations gener- is rather insensitive to the 17-kHz fundamental. The
ate the harmonics and aliasing. Note that the fluctuations third harmonic, which at - 50 dB relative to the funda-
are not of constant magnitude with the 16 995/17 005- mental is stronger than any other harmonic, aliases at 3
1.15 I I I i i
Hard clipped
_ Unclipped
Soft clipped
1.1 ",
1.05 .,"
,' '
0.95 /// \_
0.9
I
0.85
15 20 215 30 35
Time, microseconds
t E
-140
Frequency, Hz
Fig. 3. Level of 10-kHz sine-wave clipping harmonics for hard and soft clipping.
1062 J. Audio Eng. Soc., Vol. 48, No. 11, 2000 November
COMMUNICATIONS DIGITAL CLIPPERS AND COMPRESSORS
kHz, where the ear is particularly sensitive. Finally, x several dB less with the sine-wave pair than with the
is only I ms, rather short for a compressor, and so causes pure sine wave, especially with higher harmonics.
more distortion than usual. However, there is a tradeoff involved with increasing
the time constant. If the time constant is too long, the
2.1 Reducing Compressor-Generated Ailasing detector may respond to a sudden amplitude increase
Distortion and its resulting aliasing may be reduced too slowly and then clip. Furthermore, a response that
by usinga longer detectortime constant.In the preceding is too slow causesan unnatural soundingattack. But if
example the third and fifth harmonics are above - 100 a slight time delay is tolerable, there could be a delay of
dB ( - 49 and - 95 dB, respectively). Increasing _"from a few millisecondsbetween the detectorandthe variable-
1 to 10 ms reduces the third and fifth harmonics down gain input. This gives the detector some time to adjust
to -69 and - 135 dB, so only the third harmonic is before the signal reaches the variable-gain processing.
above - 100 dB. Increasing x reduces the distortion by Then the gain does not have to respond to transients as
0 b i i i
-20 I--16995
I'17000Hz
+ 1700S Hz .....................................................................
40 ................................ :............................................
, s
:/
-140 ......... _{..... i_..................... I l
il I I . _1 /
-2000 0.5 1.5 2
Frequency, Hz x lo'
20 .............................
25 ......................... ' I " i
r¢_15
1C
I I I
-50 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 018 0.2
Time, seconds
J. Audio Eng. Soc., Vol. 48, No. 11, 2000 November 1063
KRAGHT COMMUNICATIONS
rapidly, and a larger time constant can be used. Note demonstrate the effectiveness of this approach, we re-
that this delay feature is available in some common digi- place the first-order low-pass filter having "r = 1 ms
tal compressors, with the concatenation of two first-order low-pass filters,
Another method is much more effective at reducing each with time constant as in "r/X/2. The factor of
distortion and aliasing. The detector responds slightly is needed so that the first- and second-order filters have
to the fluctuations in the 17-kHz signal, even though similar low-frequency responses. In addition we delay
these occur much more rapidly than the time constant the input to the variable-gain stage by (V'2 - 1)-t,
of 1 ms. This is because the detector is essentially a thereby matching the time lag between the variable-gain
first-order low-pass filter, and as such, the response to input and the detector output with the lag of the first-
high frequencies slopes only 6 dB per octave. If we use order system. Fig. 7 shows the spectrum of the compres-
a second-order low-pass filter, we double the slope and sor output with the 16 995/17 005-Hz pair and pure 17
eliminate high frequencies much more effectively. To kHz. Again, we see a spectral spreading virtually identi-
27.5 ! ! I I i i I i
: , i i •
"_ /'' /\\/_" /\/-\ _ .jr,\ /"_ j\ f_ /_\/-_ /\ /_'-, i.'_ I_/'\ /\.,f \ ,_ir-\ /'_ j_.f\\ I_\ i-_\ I\ .
26.5
26
L32s.s
27 ....
25
24.5
204 50.2
i 50.4
I 50.6
P 50.8
I 511 511.2 51.4
I 51.6
I 51.8
i 52
Time,milliseconds
16995 + 17005 HZ I
-- 17000 Hz I
r_
= -100
/'
O 0.5 1 1.5 2
Frequency,
Hz _lo'
cal to the first-order compressor, but the harmonics are like" quality to overrecorded signals.
greatly reduced. The third harmonic decreased by 30 dB By contrast, relatively little attention has been paid
from - 50 to - 80 riB, and the fifth harmonic decreased to aliasing generated by dynamic-range compression.
from -95 to - 155 dB. Also, increasing _"is more This is partly because the problem is not as severe, and
effective at reducing harmonics than in the first-order partly because the problem is not as well understood.
system. Increasing "rto 10/%/2 ms reduces the third har- The method of using a second- or higher order detector
monic by an additional 40 dB from - 80 to - 120 dB, eliminates aliasing very effectively. Furthermore, the
thereby completely eliminating the need for oversam- same method could greatly reduce harmonic distortion
pling to avoid aliasing, with analog compressors.
3 CONCLUSION 4 REFERENCES
Although reducing many of the distortions common [1] D. Mapes-Riordan, "A Worst-Case Analysis for
to analog audio, digital audio has problems unique to Analog-Quality (Alias-Free) Digital Dynamics Pro-
itself. Aliasing is a particular problem with digital dy- cessing," J. Audio Eng. Soc. (Engineering Reports),
namics processing. It is especially severe with digital vol. 47, pp. 948-952 (1999 Nov.).
clipping. Using soft limiting will reduce aliasing, but at [2] R. Bracewell, The Fourier Transform andIts Appli-
the cost of reducing the dynamic range slightly. This cations, 3rd ed. (McGraw-Hill, New York, 1986), p. 144.
may be acceptable for many applications. In fact, soft [3] F. Floru, "Attack and Release Time Constants
limiting has been used in digital audio for some time in RMS-Based Feedback Compressors," J. Audio Eng.
now and is said to give a "smoother" and more "analog- Soc., vol. 47, pp. 788-804 (1999 Oct.).
THE AUTHOR
Paul Kraght was born in 1955 and currentlylives in effects of signal quantization, and the effect of the anti-
Glendora, CA. He received a B.S. degree in applied aliasing and antiimaging filters that were being used.
mathematics from Harvey MuddCollege in 1981. Since More recently he designed a PC-based digital dynamic
then he has been employed by Beckman Coulter, a man- compressor, which he frequently uses to make classical
ufacturer of medical diagnostic instruments. His proj- CDs suitable for backgroundmusic in his home.
ects include real-time systems software, tools for gener- Mr. Kraghtis an associate member of the AES and a
ating computercode, mathematicalmodeling, and signal member of the MAA. He also enjoys playing the cello,
processing. In 1985 he became interested in the LP- collecting recordingsof classical music, Bible research,
versus-CD debate and, as a hobby, started studying the public speaking, astrophotography,and vigorous hiking.
J.Audio
Eng.
Soc.,
Vol.48,No.11,2000
November 1065