A Software Compressor for Computer Music ApplicationsSkip other details (including permanent urls, DOI, citation information)
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 3.0 License. Please contact firstname.lastname@example.org to use this work in a way not covered by the license. :
For more information, read Michigan Publishing's access and usage policy.
Page 124 ï~~A Software Compressor for Computer Music Applications Steve Netherton Gary S. Kendall Center for Music Technology Northwestern University Evanston, IL 60208 email@example.com, firstname.lastname@example.org keywords: compression, limiting, dynamic range ABSTRACT: A software compressor/limiter has been written for computer music applications that mimics many of the characteristics of commercial units, but also provides the user with direct control of important features such as the attack time, release time, and compression ratio curve. The flexibility of the software design enables the user to apply the compressor in unconventional ways. Introduction Compressors are a common signal-processing tool in professional audio. They are most often used for compressing or limiting the dynamic range of speech and music in recording studios and broadcast radio. They are also used as a special kind of signal-processing effect to modify the character of a performance---to even out the high and low points and to smooth the transient character of an instrument. Despite of the importance of compressors to professional audio, they are seldom discussed in the context of computer music. Potential applications of compressors/limiters in computer music include the conventional control of dynamic range, especially for recorded tracks, and the less familiar sound modification. A software compressor/limiter has been written for the use of computer musicians that mimics the characteristics of many commercial units. The main component of the software is a general-purpose compressor engine written in C. A NeXTStep front-end provides the user with an intuitive graphical interface. Without the constraints of analog design, this software compressor is able to operate in unconventional ways. For example, it can anticipate the input signal by looking ahead in memory to allow true brickwall limiting without distortion. Software Design Issues There are two critical decisions in designing a software compressor. The first is whether or not the compressor must run in real time. This is equivalent to turning a computer into an standalone outboard compressor and is not essential for many computer music applications. By choosing against a real-time implementation, several distinct advantages are conferred. The computer can perform arbitrarily complex computations on the waveform without concern for timing and through-put. More importantly, the compressor can look ahead at the waveform, anticipate peak amplitudes over the threshold, and respond in advance. For example, if a peak amplitude is detected ahead, the computer can start compression early to prevent the waveform crossing the threshold. This provides the user with an excellent form of "brickwall" limiting, impossible to achieve in real-time compressors. The second vital decision is one of philosophy of design. Given that compressor need not work in real time, the analog world's speed constraint has been avoided. Should the goal, therefore, be to duplicate the functionality of an analog unit or to open the design to new potentials? A digital copy of a traditional analog unit is easy for experienced users to operate, but it does not take advantage of flexibility that a software design provides. At the risk of making the user's learning curve a bit steeper, our choice has been to maximize the user's options. 124 I C M C P ROC EE D I N G S 1995
Page 125 ï~~Functional Operation of the Compressor There are several important parameters common to all forms of compressors: attack time, release time, compression ratio, and compression threshold. A user can set a specific threshold beyond which a signal will be compressed. Any signal with an amplitude lower than the threshold will pass through unaffected. A signal whose amplitude is greater than the threshold will be compressed by the compression ratio. A 3:1 compression ratio indicates that for every three dB the input signal goes above the threshold, the output signal will only go up one dB. Most commercial units allow the compression ratio to be in the range from 1:1 up to 10:1 or more. Compression between 1:1 and 3:1 is generally considered to be mild with little audible effect. Ratios of 3:1 up to 6:1 are often used in recording. Higher ratios approach limiting effects (Figure 1.). 1:1 (No opr.ss. o) 2:1 4:1. Output I0:i (Limii c) Figure1. Input/output relationship 1:(st! for various compression ratios. Thzsbold Input (dB) The attack and release time of the compressor can also dramatically affect a compressor's functioning. The attack time is the amount of time it takes for a compressor to go from passing a signal through unaffected to compressing at the defined ratio once an amplitude greater than the threshold is detected (see Figure 2). Conversely, the release time is the time the compressor takes to return from compression to passing the signal through unaffected after the signal is once again beneath the threshold. In commercial units, the attack time can range from a millisecond up to a second. Release times are generally slower than attack times and often range from tens of milliseconds up to several seconds. Figure 2. Waveform showing attack time and shape of attack curve. There are no 'proper' settings for these parameters. The threshold is often dictated by both the technology being used and the signal itself. Settings for compression ratios and attack and release times are also very program dependent. Signals that are over-compressed can often sound flat and lifeless. Attack times set too fast can often change the envelope of sounds that depend on a sharp attack like percussion. Similarly, a long release can often make subtle nuances of a instrument's release disappear. Only through the trial and error of listening tests can appropriate settings be found. Other important aspects of compression include the method used to monitor the input signal gain and the shape of the attack and release curves. In commercial compressors, the user is rarely allowed to vary these settings, and consequently, they are an important factor in differentiating one company's product from another. There is one notable exception: some units provide a choice between monitoring the instantaneous amplitude or the rms amplitude. The rms amplitude is more or less a moving average of the signal and is often useful when compressing signals with complex waveforms. But signals with strong transients like percussion are better monitored by instantaneous amplitude than the slower responding rms amplitude. IC M C P R O C E E D I N G S 199512 125
Page 126 ï~~In analog compressors, attack and release curves are a function of the electronic components used in the unit's construction. In a digital compressor, these curves can be programmed in an arbitrary manner. All in all, the precise shape of these curves can be relatively unimportant to the character of the processed sound. The effect of different curves is generally inaudible in all but the slowest of attacks or releases. There are several variations on the simple compressor/limiter described above. Some units allow the user to break up the signal into different frequency bands. Different amounts of compression can be applied to each band before they are recombined at the output. This is useful, for example, when the bass content of a signal periodically drowns out the higher frequency components. Compressing only the bass content produces a signal that is much more spectrally balanced. Another increasingly common feature in digital compressors is the arbitrarily complex compression curve. The simple model passes the signal through unaffected up to the threshold, and then compresses at a constant ratio. This produces an input/output graph with two lines meeting at a point called the 'knee.' There is no reason, however, that arbitrarily complex graphs cannot be produced (Figure 3.) These would be difficult and costly to produce in an analog compressor, but depending on the processing power available, are relatively easy to implement in a digital design. Such a compressor can be programmed to duplicate the functionality of virtually any other compressor, and is most often used to give a digital unit the characteristics of an analog 'tube' compressor. 1:1. Figure 3. Example of arbitrarily complex compression curve. CorresCurve Output (dB) Input (d8) Conclusion In professional audio, there are well-defined problems that compressors are used to solve and long-standing traditions for how compressors are used in recording studios. Clearly the most creative uses have been occurred in popular music where listeners have become very accustomed to the sound of compressed vocals and mixes that maintain a fixed balance among the tracks. Compression has become part of the culture of recorded music. Computer music shares some of the same problems as professional audio. Both will sometimes need to compress the dynamic range of recorded material. But, computer music is also particularly open to experimental techniques, using conventional technology in unconventional ways. Some of the unconventional options included in the software compressor are control of the attack/release curves, control of the response time of the rms voltage detector, and allowance for arbitrary compression curves. With software compressor now in the hands of computer musicians, we look forward to an expanded range of applications for compression. Suggested References McNally, G. W. "Dynamic Range Control of Digital Audio Signals", Journal of the Audio Engineering Society 32(5). Nardantonio, D. N. Sound Studio Production Techniques. Tab Books (1990) pp. 119-122. Woram, J. M. Sound Recording Handbook. Sams (1989) pp. 303-329. 126 6IC MC P R O C E ED I N G S 1995