How Audio Clipping Actually Works in Mastering

Ladies and Djentlemen, we sincerely hope you're having a good day wherever you are, and enjoying whichever SubMission Audio plugins have taken your fancy.

We've had a whirlwind one and a half months since the launch of Flatline. To say that the launch was a success would be to underplay it, and it's all thanks to you: our loyal community. As part of the Flatline roll out, you would have noticed that we've incorporated site accounts, with appended loyalty discounts for members. This is something I personally felt very passionately about since the very beginning, but could only implement very recently. The loyalty and ongoing support of our community is #1, and in my opinion it should never be a one-way street.

That aside, one of the emerging issues since our launch of Flatline was the growing realization that many people fundamentally misunderstand clipping, or outright don't actually know what it is. This blog aims to help correct that!

Your average 'loudness limiter' is a tool that functions like a compressor at extremes. Think of your garden-variety compressor with an attack at around 0.1ms, release wherever you want it (though usually very short!), and a ratio between 20 and infinity. This results in the classic 'squashed' sound, where the waveform is 'dragged down' whenever it exceeds the set threshold. While it can impart a lot of excitement to music, you've likely noticed that it tends to make music very congested sounding - usually well before it gets to the volume level you want.

 

Enter: clipping! Clipping in the early days began as... a complete accident. It would occur whenever a signal would hit analogue-to-digital converters too hard, and result in the tops being chopped off. This fundamentally worked differently to limiting, because rather than the waveform being 'pushed down' with an envelope applied, this quite literally shaved the tops off the signal. This had a two-pronged effect:

Firstly: If a sustained signal was chopped too much, it would result in some fairly unpleasant aliasing distortion.

Secondly: If it hit primarily transient content, such as drums, people noticed that they, counter-intuitively, tended to sound better.

The reason the drums would remain punchy after clipping is that due to how clipping works, it actually primes the output digital to analogue converter running your speakers to create a fake 'peak' on reproduction. Because it flat-chops the peak, and perfect square waves (for scientific reasons we won't get into here) can't exist in the analogue domain, it forced the DAC into a 'brain fart' of sorts, where it actually recreated your drum transient, even though you had smashed the volume of the content. This became highly desirable in mastering, where people wanted ever-louder levels, all the while retaining the punch in their music.

This led to the adoption of 'converter clipping' in many high-end mastering houses. Whereas once these facilities would've invested tens of thousands of dollars into different limiters, they were now focusing on the quality of the analogue to digital converters themselves, allowing them to push mixes out of their mastering gear back into the digital domain, all the while gaining volume in the process. Generally speaking, better quality units would have better clipping, with less audible distortion.

Enter the 2000s and the software digital era. As much as we gained by going in-the-box, there was an equal amount lost. One of the chief concerns is that we had no way to clip as we once had.

Software digital clipping was harsh and unforgiving. In fact, you've likely already heard it quite a few times - very likely by accident! It's the sound you get when you turn your tracks up too loud and everything goes red in your DAW. This is what's called 'Hard Clipping', and if you read the tooltip on the shape knob in Flatline, you'll know that this is the setting that Flatline defaults to when you first boot it up. This is the same sound that every properly-coded software hard clipper has had. In fact, I recall using my very first one nigh on 20 years ago!

So, why would we default Flatline to start in this very unflattering state? Simple! Because it's the most extreme end-point, it allows you to dial your way back into something musical. See, the 'magic' in those converters is that they had analogue componentry converting the signal into the digital domain, so the clipping process was softened - it was saturated. That's where the magic lies. In Flatline, that magic is recreated by the 'Shape' knob. We spent months testing different algorithms and curves, until we arrived at a solution that we felt was just about perfect for mastering purposes. Being a career mastering engineer myself, and having a beta test team full of professional engineers, we had a great cadre of individuals helping to stress test Flatline to ensure that it lived up to all of our expectations.

When my mastering mentor, Thomas "Plec" Johansson, came to me and said: "I don't know what sort of magic you've pulled with Flatline, but 9 times out of 10, I'm preferring it to clipping my (very famous, expensive brand of) analogue to digital converters!", I knew we had absolutely hit it out of the park.

Flatline gives you a wide range of curve possibilities with the shape knob, but in general I personally find myself hovering between 90% and 95% as my 'sweet spot' zone. Maybe a little higher on super fast, congested material which needs lots of transient clarity, and a little lower if there are a lot of acoustic instruments and less drums.

Furthermore, if aliasing is of great concern, Flatline features an inbuilt oversampler, though the 'classic' sound of clipping profoundly comes from the lack of oversampling, so once again, you really want to get that 'Shape' knob set just right.

Circling back to digital clipping, we would only ever recommend using hard software clipping (Flatline set to 100% Shape and 0x oversampling) under very specific circumstances. I've occasionally found myself using it on the back end of a master that I've already finalized, but still felt needed half a dB more volume. Hard Clipping can sometimes be a tremendously potent way of achieving that volume transparently, should you be able to avoid the crackling that comes with it. This is why we retain that option in Flatline.

As a token of good faith, we're now going to show you the code you need to create your own software 'hard-clipper'. Hope you're ready to do some serious reading, because this is a doozy:

Now, I know we aren't all mathematical geniuses, so I hope you were able to retain all of that information!

Hard Clipping is one of the most basic algorithms to execute in audio engineering, hence why many plugin developers get their start that way, and also why many early clipping plugins were super simple and sparsely-featured. 

The wave-shape functions which actually make the clipper behave like a good-sounding converter being clipped? Well, that's a very different story.

Don't ask us, though. We're hanging onto our 11 secret herbs and spices for the time being!

Part of the reason we offer a free, no-obligation 7-day trial of Flatline is specifically so people can test it across as much material as possible, in as many configurations as they want, to ensure that it's the right tool for them before they buy.

I hope you've enjoyed this brief run-through the history of clipping, and why we all love it so much (whether or not we know it). Hopefully now you're well equipped to go out there and use clipping responsibly, as well as understanding how powerful and potent the very large 'shape' knob on Flatline is.

Until next time,
Ermin Hamidovic (Mastering Engineer, Author, Director @ SubMission Audio)