Quantcast
Oversampling Benefits When Hard Clipping? - Gearspace.com
The No.1 Website for Pro Audio
Oversampling Benefits When Hard Clipping?
Old 1 week ago
  #1
Gear Maniac
 
Gregg Hermetech's Avatar
 
Verified Member
Oversampling Benefits When Hard Clipping?

I have been wondering about this questions for a few years, and hopefully someone with the tech/science/programming/theory chops can chime in.

Let's assume I want to hard clip in a plugin, (because that's the only form of clipping I ever use in mastering). It's the most basic form of clipping, I think? No "knee", no fancy transfer curves or soft clipping/saturation stuff going on. As far as I understand it, this is literally like taking a pair of scissors to the top of the PCM stream and chopping off the peaks, square wave style, right?

So, lets assume a native sample rate of 96kHz (because that's what I always use), what benefit does oversampling the clipping have, if it is literally just "square-waving" the tops of the waveform? I'd imagine doing this at the native sample rate, or doing it a higher oversampled rate, would be exactly the same, right?

I hear oversampling is used to prevent aliasing into the audio band, which I understand for non-linear processes like distortion or saturation, but what difference is there whether I draw a straight line on top of the waveform at the native sample rate, vs. upsampling it, then drawing the straight line, then downsampling it again? Is there a difference?

I guess the question boils down to: Is OS needed for straight hard clipping, and if so, why?

I'd like to be able to understand this from a theoretical perspective, and not have to worry about the extra CPU/render time, if OS is not needed in this case.
Old 1 week ago
  #2
Tokyo Dawn Labs
 
FabienTDR's Avatar
 
Verified Member
🎧 5 years
Digital clipping belongs to a class of particularly sharp and unnatural nonlinearities, called discontinuities.
These produce a particularly uncontrollable bandwidth expansion (usually close to infinity), with oversampling offering no relief. They act like this because they directly break the sampling theorem from the beginning on.

This problem is not unlike naive time domain square wave generation, or even politics. The promised square wave principally won't be a square wave, neither in the time domain or frequency domain (at the output of your DA).

If you find good use for it, don't worry further. But in theory, PCM clipping clearly conflicts with the sampling theorem, so much it can't even be fixed from the outside. This would be comparable to finger drumming an expensive mic, or using a dynamic microphone as in ear speaker: As long it helps!

Given very dynamic material, where only clicks and short drums/percussion need some control, PCM clipping will likely be the most effective solution. This is not because PCM clipping is better, it's because noise based events such as most short+strong transients are largely immune to distortion. Distorted noise still is noise, thus almost no losses take place in the process. Just don't try this with a piano.
Old 1 week ago
  #3
Gear Maniac
 
Gregg Hermetech's Avatar
 
Verified Member
Thanks Fabien, I was hoping you'd reply. What I think you are saying is that for straight PCM hard clipping, there really is no benefit in oversampling, right?

At the moment I use Voxengo's OVC-128 which auto clips at 128x OS, and unfortunately the OS can't be changed or turned off. I will do some listening tests with StandardCLIP with no oversampling vs. oversampling on, and see if I can hear a difference, or see a difference in the square topped waveform.

I use hard clipping right before the final limiter, just to shave off some of the peaks, I always back it off if it's audible. And yes, the material is paramount to the amount of inaudible clipping you can use, I have found. Deep bass drones and pianos hate it, someonetimes won't take any at all, whereas with modern EDM you can slice way more off the snare and hats.
Old 1 week ago
  #4
Lives for gear
 
SmoothTone's Avatar
 
Verified Member
🎧 5 years
Clipping is a nonlinear process that causes large amounts of harmonic distortion. It's not bandlimited so when these additional frequency components exceed the Nyquist limit, they are reflected back into the baseband, creating aliasing which can be audible as inharmonic distortion.

At a 96kHz SR, this is still kept out of the audible range as you are essentially oversampling your whole process.

Unrelated to SR/OS, in mastering we're primarily clipping very fast transients which are usually comprised of short bursts of inharmonic noise. In this context, aliasing from clipping transients is just adding more inharmonic noise along with the harmonic distortion generated by the clipping, which doesn't necessarily sound bad and can actually sound more exciting.

So even at 44.1k, I sometimes leave OS off because the result serves the material.

[Edit: I see that Fabien posted while I was writing!]
Old 1 week ago | Show parent
  #5
Lives for gear
 
Trakworx's Avatar
 
Verified Member
3 Reviews written
🎧 10 years
Quote:
Originally Posted by Gregg Hermetech ➡️
I will do some listening tests with StandardCLIP with no oversampling vs. oversampling on, and see if I can hear a difference
That's all that matters in the end - how it sounds.

Unfortunately IME questions like this often don't have one-size-fits-all answers, so I have to make ear-based decisions in the moment for the track I'm working on.

You could also add LPFs to the equation and see how they affect any audible aliasing...
Old 1 week ago
  #6
Motown legend
 
Bob Olhsson's Avatar
 
Verified Member
🎧 15 years
Thinking about this, the biggest challenge might be a low-pass filter that does not harm the unclipped program material.
Old 1 week ago | Show parent
  #7
Lives for gear
 
Trakworx's Avatar
 
Verified Member
3 Reviews written
🎧 10 years
Quote:
Originally Posted by Bob Olhsson ➡️
Thinking about this, the biggest challenge might be a low-pass filter that does not harm the unclipped program material.
'Been experimenting with Pro-L 2 brickwall LPF. (Edit: Pro-Q 3 not Pro-L 2) At 24kHz it usually sounds invisible to me, and occasionally a tiny bit better. I'm not finding much reason not to use it. But maybe I don't know what to listen for? Always willing to learn...

Last edited by Trakworx; 1 week ago at 09:25 PM..
Old 1 week ago
  #8
Motown legend
 
Bob Olhsson's Avatar
 
Verified Member
🎧 15 years
Where is the LPF in Pro-L2?
Old 1 week ago | Show parent
  #9
Lives for gear
 
Trakworx's Avatar
 
Verified Member
3 Reviews written
🎧 10 years
Quote:
Originally Posted by Bob Olhsson ➡️
Where is the LPF in Pro-L2?
Sorry - Pro-Q 3 !
Old 6 days ago | Show parent
  #10
Lives for gear
 
Alexey Lukin's Avatar
 
Verified Member
🎧 10 years
Quote:
Originally Posted by Gregg Hermetech ➡️
What I think you are saying is that for straight PCM hard clipping, there really is no benefit in oversampling, right?
I disagree with Fabien here and encourage you to oversample your hard clipper. The more you oversample, the less aliasing you'll get in the result and the closer you get to the "analog-side" hard clipping. Whether it makes an audible difference, depends on the material, but it certainly makes a measurable difference.
Old 6 days ago
  #11
Lives for gear
 
Alexey Lukin's Avatar
 
Verified Member
🎧 10 years
Here's an illustration of hard clipping of top 3 dB from a 20-48k sine sweep at 96 kHz (click to view the animation).
Attached Thumbnails
Oversampling Benefits When Hard Clipping?-clipping.gif  
Old 6 days ago
  #12
Gear Addict
 
fradoca's Avatar
 
4 Reviews written
🎧 10 years
Yes I always oversample when i hard clip with a clipper
Old 6 days ago
  #13
Gear Maniac
 
Gregg Hermetech's Avatar
 
Verified Member
I understand the reasons people say it's better to OS non-linear processes such as hard clipping, to avoid aliasing into the audible band. I have always used OS when hard clipping, x64 in StandardCLIP and x128 in OVC-128. I don't understand the difference between chopping off the peaks at native SR vs chopping them off upsampled. A flat line is a flat line, surely, whether that flat line is made up of 100 samples at 44.1k or 200 samples at 88.k? What's the difference? I want to understand why it's better to OS hard clipping (if it indeed is), at a theoretical level.
Old 6 days ago
  #14
Tokyo Dawn Labs
 
FabienTDR's Avatar
 
Verified Member
🎧 5 years
All these techniques produce different results of course. But I'm under the impression that Gregg and many other people specifically look for the sharp sound of PCM clipping. For that "blade sharpening" PCM sound, not the technical function (i.e. overshoot prevention).

The type of material also matters in this decision. If it's clicky/noise-a-like in its nature, harmonic integrity of the clipping process won't really have relevant effect. If the material is harmonic in its nature, of course proper antialiased clipping will behave better (e.g. the piano when clipped will still sound bad, but a minutely better type of bad ).

I've always been a supporter of antialiasing in audio processors and haven't changed my mind. But IMHO the only reason to opt for a raw clipper in 2022 is creative purpose, not technical reasoning. Creatively, PCM clipping is just fine if not even a superior creative option: It introduces a characteristic sharpness to the sound that's hard to find elsewhere.

I'd suggest keeping all options on the table. Various techs give you different shades of "crazy aggressive".
No definition of clipping is really technically sound, no implementation more correct than the other. They are just different creative options (with the spectral/harmonic integrity suffering either way!).

Last edited by FabienTDR; 6 days ago at 12:41 AM..
Old 6 days ago | Show parent
  #15
Lives for gear
 
SmoothTone's Avatar
 
Verified Member
🎧 5 years
Quote:
Originally Posted by Gregg Hermetech ➡️
I don't understand the difference between chopping off the peaks at native SR vs chopping them off upsampled. A flat line is a flat line, surely, whether that flat line is made up of 100 samples at 44.1k or 200 samples at 88.k? What's the difference? I want to understand why it's better to OS hard clipping (if it indeed is), at a theoretical level.
If we use the analogy of Nyquist as a barrier that bounces spectral content back down into the lower frequency range (aliasing). The higher the sampling frequency - whether native, upsampled or oversampled - the further this barrier is from the audible range.

Then of course a lpf will prevent any of that reflected content finding its way back into the audible range. This can be achieved at any sample rate but a higher Fs allows for a gentler filter which is less likely to cause its own artefacts in the audible range.
Old 6 days ago | Show parent
  #16
Lives for gear
 
SmoothTone's Avatar
 
Verified Member
🎧 5 years
Quote:
Originally Posted by FabienTDR ➡️
But I'm under the impression that Gregg (and many other people) specifically look for the sharp sound of PCM clipping. For that "blade sharpening" PCM sound, not the technical function (i.e. overshoot prevention).
While many people seem to like the effect that clipping distortion has on transients and we're hearing it used more and more as a sound design production aesthetic, in mastering I think it's as much about what happens around the transients as to them.

Clipping often maintains the perception of depth and openness along with the sense that drums move air better than other processes, especially in high quality AD circuits where the analogue stage contributes something to the sound.

So often clipping is the most musically (not technically) transparent option in mastering. This was certainly the case more in the past, but the transient stages in limiters like Limitless and Pro-L2 have changed this significantly.
Old 6 days ago | Show parent
  #17
Lives for gear
 
Alexey Lukin's Avatar
 
Verified Member
🎧 10 years
Quote:
Originally Posted by Gregg Hermetech ➡️
A flat line is a flat line, surely, whether that flat line is made up of 100 samples at 44.1k or 200 samples at 88.k? What's the difference?
A straight line of PCM samples does not necessarily represent a straight line in the corresponding analog signal. Two pics below show the zoomed-in waveform pieces from the clipped sine sweeps.

In the non-oversampled case, the PCM samples (visible as white dots) are on a straight line, but the reconstructed analog signal (blue curve) exhibits ringing, which is pretty inconsistent: it depends on a relative phase between the sinusoid and the sampling instants. This "beating" with the sampling rate is what creates aliasing.

In the oversampled case, the ringing is consistent between the periods of the (clipped) sine wave. The waveform does not look "nice", but it is mathematically correct: if you recorded an analog-generated clipped sine wave, it would look like this.
Attached Thumbnails
Oversampling Benefits When Hard Clipping?-clippedwave1.png   Oversampling Benefits When Hard Clipping?-clippedwave2.png  
Old 6 days ago
  #18
Lives for gear
 
Alexey Lukin's Avatar
 
Verified Member
🎧 10 years
Using a gentle SRC filter at 96 kHz, it is actually possible to be alias-free and reduce ringing in the waveform at the same time.
Attached Thumbnails
Oversampling Benefits When Hard Clipping?-clippedwave3.png  
Old 6 days ago
  #19
Tokyo Dawn Labs
 
FabienTDR's Avatar
 
Verified Member
🎧 5 years
^^ That's certainly the optimum technically. A generously oversampled clipper is ISP* aware, thus offers predictable overshoot control, introduces the least amount of partials. Certainly the first choice if the material is highly dynamic and doesn't ask for creative correction.

My thought was more in analogy to what an FM synth is to a standard subtractive synth.

Both cover their own expressive ranges, with FM being great for metallic effects, classic subtractive great for harmonic stuff. From the music theory point of view, FM is just horrible, breaks the sampling theorem by design. But it's the only way we have to reasonably produce harsh/rough/metallic sounds.

To me the PCM clipper is simply the most "FM synth" of all clipper options, an expressive option. IMHO there is no simple answer to Greggs question that would satisfy both tech/math considerations and the creative demands. If in doubt, I'd suggest a limiter instead.

*I don't like this term, but it serves as a humble wink

Last edited by FabienTDR; 6 days ago at 04:12 AM..
Old 6 days ago | Show parent
  #20
Gear Maniac
 
Gregg Hermetech's Avatar
 
Verified Member
Thanks for all the great replies and discussion, and particularly thanks to Fabien and Alexey for the more in depth technical analysis. I think I am starting to grok it a bit harder. Alexey's last couple of posts helped the penny drop.

Quote:
Originally Posted by FabienTDR ➡️
But I'm under the impression that Gregg and many other people specifically look for the sharp sound of PCM clipping. For that "blade sharpening" PCM sound, not the technical function (i.e. overshoot prevention).
Not really, for me it's nothing to do with the "sound" of clipping, it's the exact opposite, I'm trying to achieve as much completely transparent "free gain" as I can, before the final limiter. If I can start to hear the clipping, I back it off. I've found hard clipping can give me this free gain, then the following limiter has more of a "sound", but it's usually one I quite like, if I don't push it too hard (usually Limitless in my case).

I've always used oversampled clippers to get this transparent free gain from clipping, was just wondering if it might be possible to use non-oversampled clipping to achieve the same effect, and therefore save CPU cycles/render time. Hence my original question about the difference/non-difference in the specific case of hard clipping.

But your point is good, best just to view all these as tools, and be able to adapt to each track/project to achieve the best results, as always in mastering. I shall re-install StandardCLIP and get experimenting on upcoming projects... Not sure how Aleksey from Voxengo gets his OVC-128 to be so low CPU, it's a mystery!

I've never used soft clipping on clippers for mastering as I generally hate how it sounds, all distorted and mushy.

SmoothTone, I've never experimented with the newer transient features in the Limitless prefs, as they have still not been added to the manual. Any good tips?
Old 6 days ago | Show parent
  #21
Lives for gear
 
SmoothTone's Avatar
 
Verified Member
🎧 5 years
Quote:
Originally Posted by Gregg Hermetech ➡️
SmoothTone, I've never experimented with the newer transient features in the Limitless prefs, as they have still not been added to the manual. Any good tips?
I just meant the faster stage of limiting. You know how Limitless does it's work with 2 limiters? One tuned for slower dynamics and the other tuned to faster transients, where the "Dynamics" control determines how much is done by each stage: 100% means the dynamics stage does all the work and 0% means the transient stage does all the work. (You probably know all this but it doesn't hurt to be clear).

In my limiting template, I have an instance of Limitless set to transient only ("dynamics" 0%) and I shoot it out against my clipper of choice. Sometimes limitless sounds more punchy or cleaner than the clipper.

This is followed by a second, "slower" limiter that does the rest of the work. For obscene loudness, I might have a clipper before the Limitless to share the load and get that free gain that you talk about.

And then there's those mixes that make you work for every 10th of a dB!

Quote:
I've never used soft clipping on clippers for mastering as I generally hate how it sounds, all distorted and mushy.
Me too.
Old 5 days ago | Show parent
  #22
Lives for gear
 
E Artsy Moods's Avatar
 
🎧 10 years
Quote:
Originally Posted by Alexey Lukin ➡️
I disagree with Fabien here and encourage you to oversample your hard clipper. The more you oversample, the less aliasing you'll get in the result and the closer you get to the "analog-side" hard clipping. Whether it makes an audible difference, depends on the material, but it certainly makes a measurable difference.
I feel oversampling when hard clipping begins to really make a difference when you're clipping for a longer time and more dBs, which means you're reaching the very limit between the transient part and the sustained parts of the material, and there using oversampling may save things a bit, ie that mean you're already in destructive hard clipping lands and it'll really have an impact of sound but that can bring this closer to certain styles of music, like Ableton's Saturator's plastic sound being abused by naïves Brostep producers.
And I mean this in a kind of positive way, as those guys tried things, created their aesthetic by accepting their limitations at that time, and made it work for them, which is the point of professional producers... which isn't the point of mastering engineers I totally agree

Time changes and producers are getting better at "clean loudness".
By the way, I'm curious guys about your thoughts on the loudness vs "cleanness" of this track by Nömak / Ö (btw you're not ready ):

https://www.youtube.com/watch?v=Okh1-yfw9Ao

(ps: if I need to switch from hard clip to soft clip, the answer is even more oversampling I think; but we're talking about hard clipping so... that was just to ad something for beginners in case some are reading )
Old 4 days ago
  #23
Lives for gear
 
Adebar's Avatar
 
🎧 15 years
Quote:
Originally Posted by Gregg Hermetech ➡️
I have been wondering about this questions for a few years, and hopefully someone with the tech/science/programming/theory chops can chime in.

Let's assume I want to hard clip in a plugin, (because that's the only form of clipping I ever use in mastering). It's the most basic form of clipping, I think?
Hmm, the most basic form of clipping is to override the ad converter I think. ;-)
Old 4 days ago | Show parent
  #24
Lives for gear
 
Adebar's Avatar
 
🎧 15 years
Quote:
Originally Posted by Gregg Hermetech ➡️
I don't understand the difference between chopping off the peaks at native SR vs chopping them off upsampled. A flat line is a flat line, surely, whether that flat line is made up of 100 samples at 44.1k or 200 samples at 88.k? What's the difference? I want to understand why it's better to OS hard clipping (if it indeed is), at a theoretical level.
Fabien already showed it. It isn't a flat line - neither in 48k nor in 96k.

Isn't it interesting? Even the "forbidden" processing like clipping sounds better in higher sampling rates ;-)
Old 4 days ago | Show parent
  #25
Gear Maniac
 
Gregg Hermetech's Avatar
 
Verified Member
Quote:
Originally Posted by Adebar ➡️
Hmm, the most basic form of clipping is to override the ad converter I think. ;-)
Not really, because then you are bringing the analogue circuitry into the equation as well, therefore, not as basic I think. ;-)
Old 4 days ago | Show parent
  #26
Gear Maniac
 
Gregg Hermetech's Avatar
 
Verified Member
Quote:
Originally Posted by Adebar ➡️
Fabien already showed it. It isn't a flat line - neither in 48k nor in 96k.

Isn't it interesting? Even the "forbidden" processing like clipping sounds better in higher sampling rates ;-)
I'll let my ears be the judge on my client's material. Jury's still out, as I haven't tried non OS clipping yet, this week I will give it a go.

It's a toughy as I clip very lightly, I might have to try crushing stuff with and without OS to "turn my ears up" to hear the difference. But if it's inaudible with the amount of clipping I generally do, with or without OS, might as well turn it off and save myself CPU cycles/render time.
Old 4 days ago | Show parent
  #27
Lives for gear
 
Adebar's Avatar
 
🎧 15 years
Quote:
Originally Posted by Gregg Hermetech ➡️
Not really, because then you are bringing the analogue circuitry into the equation as well, therefore, not as basic I think. ;-)
In a good ad converter the analog stage is not overridden even when the digital signal is already at 0 dbFS.
Old 4 days ago | Show parent
  #28
Lives for gear
 
Adebar's Avatar
 
🎧 15 years
Quote:
Originally Posted by Gregg Hermetech ➡️
I'll let my ears be the judge on my client's material. Jury's still out, as I haven't tried non OS clipping yet, this week I will give it a go.

It's a toughy as I clip very lightly, I might have to try crushing stuff with and without OS to "turn my ears up" to hear the difference. .....
I think there is nor forbidden processing as long as it serves the music or the result you want achieve. That's why I set the word forbidden in quotation marks.

Clipping often is useful and the only instance to see if it works is (always) using the ears. I think we are very close together in this point.
Old 4 days ago | Show parent
  #29
Gear Maniac
 
Gregg Hermetech's Avatar
 
Verified Member
Quote:
Originally Posted by Adebar ➡️
In a good ad converter the analog stage is not overridden even when the digital signal is already at 0 dbFS.
What does "overidden" mean?

The analogue circuitry is still a contributing factor to the sound, ergo, not the most basic form of clipping, IMO.
Old 4 days ago | Show parent
  #30
Lives for gear
 
Adebar's Avatar
 
🎧 15 years
Quote:
Originally Posted by Gregg Hermetech ➡️

The analogue circuitry is still a contributing factor to the sound, ergo, not the most basic form of clipping, IMO.
Sorry, now I get what you say. From the technical side you are right. The most basic form of clipping is just to hard clip a plug in.

Quote:
What does "overidden" mean?
In other words. In a good ad converter the analog stage just in front of the sampling does not show distortions even when the digital output already is at 0 dBFS.

For mastering you can also use another basic form of clipping (ok, not the most basic form of):
If your mastering chain is set ip with analog equipment then it might be better to use a high quality ad converter for clipping already at this stage. This often results in a more useful clipping behaviour then just move the gain up in a DAW/plug in
📝 Reply

Similar Threads

Thread / Thread Starter Replies / Views Last Post
replies: 28437 views: 2554013
Avatar for monkeyxx
monkeyxx 8 minutes ago
replies: 142 views: 35283
Avatar for RightOnRome
RightOnRome 30th November 2021
replies: 181 views: 40924
Avatar for ~ufo~
~ufo~ 3rd April 2020
replies: 382 views: 130384
Avatar for KPere
KPere 1 week ago
Topic:
Post Reply

Welcome to the Gearspace Pro Audio Community!

Registration benefits include:
  • The ability to reply to and create new discussions
  • Access to members-only giveaways & competitions
  • Interact with VIP industry experts in our guest Q&As
  • Access to members-only sub forum discussions
  • Access to members-only Chat Room
  • Get INSTANT ACCESS to the world's best private pro audio Classifieds for only USD $20/year
  • Promote your eBay auctions and Reverb.com listings for free
  • Remove this message!
You need an account to post a reply. Create a username and password below and an account will be created and your post entered.


 
 
Slide to join now Processing…

Forum Jump
Forum Jump