×

Language and Currency

Choose your language

How we designed the Bus Clipper 

This article presents some technical aspects and challenges that we faced during the development of the Bus Clipper. It complements the user guide by bringing more DSP details on the main Clipper and Booster sections and the built-in aliasing reduction algorithm. It also explains some design choices that we made regarding oversampling and true-peak limiting. 

Clipper 

The Clipper stage uses waveshaping functions to prevent the signal from going above a given ceiling. These functions can take several shapes, from soft-clipping to hard clipping (with the continuous Shape control), with different curvatures generating various harmonic distortion patterns. We tried dozens and selected the 3 most relevant. They all have their distinctive sound, fitting any use case. Hard clipping can be used to transparently limit the peak level of a sharp transient, but it can sound harsh on kicks and 808s for example; in this case soft clipping might be preferred, and the Gentle, Tight and Harmonics modes should cover all cases to get the perfect sound whatever the input material. 

The Harmonics mode generates a limited number of odd harmonics while the input signal remains below the ceiling. It can be useful to precisely shape the tone of the source material. 

Booster 

The Booster stage uses similar waveshaping functions to increase loudness without increasing the peak level. It is positioned after the clipper stage so that it works on signals already reduced below the ceiling level. As we can see on the following figures, for low amplitudes, the Booster function is a straight line, ensuring linear gain for a transparent level boost. For higher amplitudes, the function is smoothed out towards the point at coordinates (x=1.0, y=1.0) ensuring the signal stays below the ceiling while generating soft harmonic distortions. 

Like the Clipper modes, the Booster modes have different harmonic profiles that make them suitable for specific use cases. 

Anti-Aliasing 

Bus Clipper uses an advanced aliasing reduction algorithm greatly inspired by Stefan Bilbao’s antiderivative antialiasing technique presented in [1]. This great article from Jatin Chowdhury’s blog popularizes the concept, so we won’t dive into more theoretical details here. 

Note that this method introduces some latency; that’s why we only use it when oversampling is On. Doing so, we keep a zero-latency algorithm when oversampling is Off. 

The following figure shows the difference between regular oversampling and anti-aliased oversampling. We can see that aliasing is reduced by around 20dB with x4 oversampling and anti-aliasing, when compared with regular x16 oversampling. 

In Bus Clipper we chose to go up to x16 oversampling with anti-aliasing, yielding better results than regular oversampling, even with factors as high as 256. 

Some oversampling considerations 

When using Bus Clipper with oversampling, you might encounter a situation where you can see on the waveform display the output signal being above the ceiling: 

This is perfectly normal and is the illustration of the Gibbs phenomenon. When oversampling is active, clipping creates a step in the upsampled waveform and the low-pass filter used during the downsampling process changes this step into oscillations. These oscillations are characteristics of the filter used, that’s why they differ between linear-phase and minimum-phase oversampling. Linear-phase oversampling generates symmetrical oscillations with low amplitudes while minimum-phase oversampling generates asymmetrical oscillations with higher amplitudes. 

We considered several ways of improving this behavior, because when using a clipper, we should expect the output signal to never go above the ceiling. The most efficient solution was to use a limiter after the downsampling to limit the amplitude of these oscillations. Since a limiter always has an influence on the sound, even when designed to be as transparent as possible, we let the user decide whether or not to use the following true-peak limiter. 

True-Peak estimation 

Bus Clipper signal flow ends with a true-peak limiter that has 2 goals: 

  1. In a mastering context, estimate and limit inter-sample peaks to ensure that no clipping will happen in the analog domain after the digital to analog conversion. 
  1. As explained in the previous section, limit digital peaks that can appear after the downsampling of the Clipper and Booster stages. 

In ITU-R BS.1770-5, the International Telecommunication Union proposed an algorithm for estimation of true-peak level within a digital audio signal, which is basically an oversampling algorithm: 

“The 4x over-sampling filter increases the sampling rate of the signal from 48 kHz to 192 kHz. This higher sample rate version of the signal more accurately indicates the actual waveform that is represented by the audio samples” 

The described algorithm uses an order 48 FIR filter to perform x4 oversampling, which is the minimum requirement for a computationally efficient true-peak estimation because it might be “implemented in an ordinary low-cost DSP or FPGA, or perhaps in an even more modest processor”. However, in a high-quality mastering plugin, it might be interesting to use a higher oversampling factor and a higher order FIR filter to have a better true-peak estimation. 

In Bus Clipper we use a x16 oversampling and order 1024 FIR filter to ensure a strong stop-band attenuation and minimize the ripples in the pass-band. Here’s how we compare with the ITU version: on the top figure you can see that our version has a better stop-band attenuation by 50dB, with a steeper transition. The bottom figure zooms on the pass-band magnitude response to show that the shorter ITU filter has some ripples that can distort the estimation by +/- 0.1dB depending on the frequency. 

The oversampling filter we chose to use here is a trade-off between the precision of the true-peak estimation and the computational cost. But other metering tools might use a different one, favoring either the precision or the computational cost. That’s why true-peak estimation may vary slightly across different metering tools. 

Bus Clipper is available as a standalone purchase or included in Complete Access. We hope that you’ll enjoy using it as much as we enjoyed developing it. 

References 

[1] Bilbao, S., Esqueda, F., Parker, J.D., & Välimäki, V. (2017). Antiderivative Antialiasing for Memoryless Nonlinearities. IEEE Signal Processing Letters, 24, 1049-1053.