Using compressors to avoid output clipping

Document created by BrettG on Aug 29, 2011
Version 1Show Document
  • View in full screen mode

Q: My SigmaDSP program allows the user to set EQ and volume settings. The EQ can be boost or cut. When the user boosts an EQ band, sometimes there is distortion on the outputs of the serial port or DAC. How can I fix this?


A: If you are using gain inside the DSP, there is the potential that you clip the signal when it is output. The number format for 24 bit audio is 1.23, and the format in the DSP core is 5.23 (4 bits of headroom are added). For more information on these number formats, see here: http://ez.analog.com/message/13377#13377

 

If you increase the gain inside the DSP, you can avoid clipping because of these headroom bits (up to 24 dB). However, when you output from the DSP to the DAC or the serial output port, the top 4 bits will be truncated (saturated) and clipping will occur.

 

Therefore, you will need to do one of the following:
- Place some attenuation on the input signal
- Use some limiter or compressor functionality as the last step in your signal flow

 

I would suggest using a full-range (-90 dB to +24 dB) RMS compressor with a fast time constant, relatively fast release, soft knee, and a limiting curve set at around -3 dB to -6 dB. I attached an example project for reference. Alternatively, you can use the limiter cell.

 

ScreenHunter_02 Aug. 29 10.53.jpg

Outcomes