AUDIO DYNAMIC RANGE PROCESSOR WITH ADJUSTABLE CREST FACTOR SENSITIVITY
BACKGROUND OF THE INVENTION The present invention relates to an audio processing system and more particularly to an audio dynamic range processor with adjustable crest factor sensitivity.
Prior art audio dynamic range compressors and limiters accommodate signals with varying crest factors (ratio of peak magnitude to average magnitude) by means of an "observation window" (period of time over which the magnitude of the input signal is computed) which is selectable between "average" and "peak". Choice of the appropriate "observation window" is always a major compromise between the fairly long interval associated with the "average" window and the extremely short interval associated with the "peak" window.
SUMMARY OF THE INVENTION The present invention provides an audio dynamic range signal processor. In one embodiment the processor uses an averaging detector for receiving an input signal and for generating a time-averaged value of the input signal defined as the average signal magnitude. The processor includes a peak detector for generating a value representative of the peak magnitude of the input signal defined as the peak signal magnitude, and an adjustable Crest Factor Sensitivity factor for adjusting the peak signal magnitude to produce an adjusted peak signal magnitude. In addition, the processor has a selector for setting a selected signal magnitude as the larger of the average signal magnitude and the adjusted peak signal magnitude. The processor has a dynamic processor for adjusting the amplitude of the input signal with variable gain, where the dynamic processor gain is dependent upon the selected signal magnitude.
DESCRIPTION OF THE DRAWINGS The present invention is readily understood with reference to the following specification and drawing wherein:
FIG. 1 is a block diagram of the present invention; and FIG. 2 is a software flow diagram of the present invention.
DETAILED DESCRIPTION Figure 1 shows a block diagram of the components of a preferred embodiment of the audio signal processor with adjustable crest factor sensitivity. The preferred embodiment uses digital signal processing. However, the invention may also be implemented in the analog domain.
Referring first to FIG. 1, analog audio input signals designated by the arrow 20 are applied to an analog to digital converter (ADC) 22, for example a Crystal Model No. CS5390. The input signal may instead be some component of a video signal. The digitized audio signals from the ADC 20 are then applied to a digital signal processing (DSP) computer 24, for example a Motorola Model No. DSP 56004 and processed as set forth in FIG. 2 and described below. The output of the DSP 24 is then applied to a digital to analog converter (DAC), for example, a Crystal Model CS 4329, and converted back to analog signals, as represented by the arrow 28.
The software for the DSP 24 is illustrated in FIG. 2. In step 30, a single sample of audio data is received from the A/D converter 22. The Crest Factor Sensitivity "CFS" parameter is selected by an operator in step 32, based upon dynamics of audio signal and listening preferences. Values of the CFS range from 0.0 through 1.0; at 0.0 signal peaks are ignored and only average values are used to compute signal level, at 1.0 the signal peak is left unweighted.
The crest factor is defined as the ratio of the peak value of a signal to its average. In this representative embodiment, the level detector will respond to the average signal level unless a peak is encountered whose crest factor exceeds the reciprocal of the CFS parameter. The CFS parameter thus represents the reciprocal of the crest factor that a signal must possess before the detector responds to peaks rather than averages.
In step 34, the absolute value of the audio sample received in step 30 is computed by the DSP 24. The exponential time constant "TC," as used in this embodiment, is computed and stored in computer memory in step 36. Selection of a proper time constant is well-known in the art. Subsequently in step 38, the Current
Level 2 "CL2" parameter that was calculated for the previous audio sample is stored in computer memory.
A Current Level 1 "CL1" parameter is computed as the product of the CFS parameter, which ranges from 0.0 through 1.0, and the absolute value of the current audio sample in step 40 (i.e., the peak value). The value CL1 thus represents the weighted or adjusted instantaneous amplitude of the input signal. A Current Level 2
"CL2" parameter is calculated in step 42 for the current audio sample using the TC parameter obtained from step 36, the absolute value of the current audio sample computed in step 34, and the previous value of the CL2 parameter stored in step 38. This algorithm implements a first-order lowpass filter through which the absolute values of the audio data are passed, thus representing the averaged level, or average signal magnitude, of the audio data. Steps 34 - 38, and 42 - 44 are therefore a detection of the average signal magnitude.
Such first-order lowpass filters algorithms as used by the average detector in steps 34 - 38, and 42 - 44 are well-known in the art. Many types may be used, for example, chapter 6.4 of the textbook, A. Oppenheim, A. Willsky, and I. Young
Signals and Systems (1983, Prentice-Hall, Inc.), provides different types of lowpass filter algorithms that include a time constant, such as TC.
The CL2 parameter for the current audio sample is stored in computer memory to be used as the "Previous Level" parameter for the subsequent audio sample in step
44. Thus, the average detector regenerates the CL2 parameter after the reception of each audio sample.
The Current Level "CL" parameter is selected in step 46. The CL parameter is set as the larger of the CL1 and CL2 parameters. In this way the average level CL2 is defined as the selected signal magnitude, CL, unless a peak in the audio data is encountered that is large enough to overcome the weighting.
The selected signal magnitude calculated in step 46 controls the processing of the input signal performed by a dynamic processor of the DSP 24. The dynamic processor is used for adjusting the amplitude or signal level of the input signal with a variable gain. The dynamic processor's variable gain is dependent upon the selected signal magnitude; thus, the selected signal magnitude controls the dynamic processor's processing by setting the dynamic processor's gain.
The dynamic processor described above, like typical dynamic processors known in the art, may be comprised of a compressor, a limiter, a gate, an expander, a ducker, a de-esser, or any combination thereof. As is known in the art (see, e.g., B. Hurtig Multi-Track Recording for Musicians at pp. 55-59 (1988, Alfred Publishing Co.)), dynamic processors control the amplitude levels, or dynamic range, of audio signals. Dynamic processors, such as compressors, limiters, de-essers, and duckers, reduce the dynamic range of audio signals. Conversely, dynamic processors, such as expanders and gates, increase the dynamic range of audio signals.
For instance, compressors reduce the level of signals which pass a threshold value, while limiters prevent the level of signals from exceeding the threshold level. Expanders, on the other hand, reduce the level of signals which fall below a threshold value, while gates virtually silence signals that fall below the threshold level. Duckers typically compress, or suppress, a second signal under the amplitude of the input signal when the input signal magnitude exceeds a threshold level. De-essers, as their name indicates, are designed to reduce the "hiss" associated with sibilance. De-essers accomplish this by compressing the appropriate frequencies (approximately 2000 - 6000 Hz) of an input signal associated with sibilance ("sibilance frequencies"), when the signal level in the sibilance frequencies of the input signal exceeds a threshold level. Past dynamic compressors, however, have not used the input signal's magnitude, calculated with an adjustment for its crest factor as described above, as the basis for comparison against the threshold level.
The embodiment shown in steps 48 - 56 in Figure 2 employs a compressor as the dynamic processor. In step 48, the amplitude of the audio data, represented by the CL parameter, is compared with the previously established threshold in step 48. If the amplitude is above the threshold then control passes to step 50. If the amplitude is less than or equal to the threshold then control passes to step 52.
In step 50, the amplitude of the audio data is determined to be above the threshold. The value of the Gain parameter (which is actually an attenuation in this case; "gain" is used here in its generic sense so that it can represent either boost or cut) is determined such that it will reduce the amplitude of the audio data to the
appropriate level based upon the previously established compression ratio settings. Methods for determining the gain value are well known in the art.
In step 52, the amplitude of the audio data is determined to be below the threshold. Signals with an amplitude below the threshold are unaffected by the compressor, therefore the Gain parameter is set to 1.0.
Sudden changes in the value of the Gain parameter are prevented through the use of "Attack time" (in the case of a reduction in Gain) or "Release Time" (in the case of an increase in Gain) implementations that ramp the gain value gradually from its previous value to its new value in step 54. Methods for implementing Attack and Release Times are well-known in the art.
The adjusted value of the current audio sample is computed as the product of the Gain value determined in step 56 and the audio sample obtained from step 30. The adjusted audio sample is sent to the D/A converter 26 in step 58.
In operation, the preferred embodiment solves the problems described above associated with past signal processors. The preferred embodiment effectively employs two "observation windows" (effective window-of-time over which the signal magnitude is computed) — one of length suitable for "average" magnitude computations and the other of length factor, continuously adjustable between 0.0 and 1.0, is applied to the magnitude computed by the "peak" detector as a means of controlling sensitivity to crest factor. At each point in time the "average" magnitude is compared with weighted "peak" magnitude and the larger of the two is considered to be the signal magnitude for use in subsequent operations of the compressor (dynamic processor).
Use of the "weighting" factor as a crest factor sensitivity adjustment is demonstrated with the following examples, in which it is assumed for convenience that the "average" detector performs a true RMS computation:
The crest factor of a sinewave is 2 . If the "weighting" factor applied to the
"peak" detector is set to XI Ϊ. , then the "average" detector and the "peak" detector will compute exactly the same magnitude for the sinewave. If, however, the "weighting" factor is set to 1.0, then the "peak" detector will compute a magnitude that is Λ/2 times the magnitude computed by the "average" detector for the same
sinewave signal, and the compressor attenuation will be set according to this higher value.
If the input signal consists of a sinewave of RMS amplitude 1.0 combined with a very short impulse of amplitude 10.0, then the "average" detector will compute a magnitude of slightly greater than 1.0 while the "peak" detector will compute 10.0. By setting the "weighting" factor to less than 1/10, the magnitude computed by the "peak" detector will be ignored in favor of the magnitude computed by the "average" detector. With any "weighting" factor greater than 1/10, though, the weighted peak value will be larger than the average value and will thus be considered by the detector to be the signal magnitude.
In the manner described above, the magnitude computation may be set to ignore peaks altogether in favor of average values ("weighting" factor = 0.0), or to ignore average values altogether (unless the signal segment is constant) in favor of peak values ("weighting" factor = 1.0), or to anything in between. While a preferred embodiment of the present invention has been described, it should be understood that various changes, adaptations and modifications may be made therein without departing from the spirit of the invention and the scope of the appended claims.