Remove clipping distortion through phase cancelling?

Discussion in 'Mastering' started by headchem, Dec 18, 2005.

  1. headchem

    headchem Guest

    I just tried this crazy experiment, and I need help understanding the results.

    Here's what I did:

    1. I turned up the final output volume in my mastering chain so loud that it created very noticable digital clipping in the loud sections of the song. I exported this song.

    2. I then exported a quieter version with no digital clipping.

    3. I import them both into a tracking program.

    4. I invert the phase on the loud version and adjust the levels until all the shared sounds are phase cancelled, which leaves me with just the digital clipping sound.

    5. I then invert the phase of the digital clipping and add it back to the super loud clipped version.

    7. The clipping sound from the loud version is gone, but both clean and distortion-cancelled versions sound almost identical.

    I was hoping that my distortion-cancelled version would sound much louder than the clean version, but without the distortion. Can anyone explain to me why this didn't occcur?

    Also, can someone try to emulate my experiment to make sure I did everything right?
  2. hueseph

    hueseph Well-Known Member

    Not sure what you are comparing this too but I'm taking a stab that you are thinking it might work like a humbucking pickup which tends to have more power than a single coil. Of course this is not because there is phase cancellation but because there are two pickups. Hence, twice the power.
  3. headchem

    headchem Guest

    I should clarify the loudness aspect. I normalized both the clean version and the loud version, and they both ended up with the same volume. I had hoped that the loud version would normalize louder because the peaks were chopped off (which caused distortion, but then this distortion was removed). Did I somehow add back those peaks when I phase-cancelled the clipping distortion?
  4. Michael Fossenkemper

    Michael Fossenkemper Distinguished past mastering moderator Well-Known Member

    yes you did. compression, limiting, and clipping are non linear process's. The difference is exactly that, the difference. what you are getting is not quite the same thing but very close. It's easy to confuse these things. Although you are starting to think in a direction that will get better results. Questioning things and experimenting gets you closer to the result. You did everything right in your theory, the problem is that your theory was wrong.

    The only clipper that I've heard that reduced the effect of clipping to an acceptable level is the omnia. At $12,000 it should do some things well, clipping artifacts was one of them, but only to a certain degree, and this wasn't near the levels of some of the louder CD's out there.
  5. headchem

    headchem Guest

    Dang... I thought I was on to something. Yeah, it makes sense that I took something out, then put it back again with all of that. Oh well, maybe my next idea will change the world!
  6. huub

    huub Guest

    Did you look at the waveform of your final product?
    what did your peaks look like?
  7. McCheese

    McCheese Well-Known Member

    Hey, so it didn't pan out. You were doing one thing very very right. You were thinking. That's 10,000% more than most people do.

    Besides, some day you may need to use this to save what would be an otherwise completely useless track or something, and you'll be glad you did it.
  8. headchem

    headchem Guest

    In case you all are curious, here are the files in mp3 (short fragment of the song):

    The original material: Original

    The same file will the volume turned up so it clips: Loud Distorted

    The difference between the two extracted by inverting the phase of one of them: Distortion Isolated

    This clipping sounds like a lot of high frequency energy - what frequencies are most common in digital clipping?

    Finally, the loud distorted version played with the isolated distortion (inverted) to cancel out the clipping: Distortion Removed

    Interesting, but I'm not sure there's anything useful here - just a demonstration of the laws of physics. According to the iTunes Sound Check, the original file is about 3 dB louder than the distortion removed file, but I don't know how to measure this accurately.
  9. RemyRAD

    RemyRAD Well-Known Member

    Headchem, the reason why your original is 3db louder, is because you flipped phase and combined both files, causing overall cancellation. It is like an operational amplifier, or Op-Amp circuit. It's the same principle. No negative feedback = hi again but more open sounding. Lots of negative feedback = low gain and a slightly more squeezed sound. (In real recording consoles this was a factor on the character of the sound. If you wanted a more open, upfront sound, you cranked microphone gain as much as you can get away with, before distortion, unless that's what you wanted. If you wanted a more smoother sound, you would crank microphone preamp gain down and push your fader higher. You would also get more headroom that way. But in mixers like the Mackies, they actually have a fixed gain microphone preamplifier and then an intermediate amplifier after that for actual gain control. That's why they generally sound somewhat consistent, regardless of gain setting.

    You have simply reduced overall gain by your slight difference in level matching and probably due to the amount of overload which prevented gain from getting higher in your distorted version. Similar to the technique used in saturation of analog tape but certainly not the same results (that's why we don't do that in digital). Analog tape is nonlinear. Digital is linear. So your distortion in analog tape can be thought of as musical and due to its nonlinear 2nd harmonic components, similar to tube saturation, which is heavily more 2nd harmonic components and your distortion in linear digital can be considered, generally symmetrically clipped, third harmonic, unmusical, as 3rd harmonics do not occur naturally in real life.

    But experimentation is always fun and you always learn something.

    Happy Harmonics!
    Ms. Remy Ann David
  10. Falken

    Falken Active Member

    your before and after sound the same because they are the same.

    this is what you basically did:

    B - (B - A) = A
  11. dcollins

    dcollins Guest

    Once you enter "non-linear land" that wont work! x^y is the problem.

    The interested can go here:

    Link removed

    "beginners search"

    type "Robert Orban" as inventor

    You can see several approaches to a distortion cancelled limiter.

  12. Michael Fossenkemper

    Michael Fossenkemper Distinguished past mastering moderator Well-Known Member

    Welcome Dave,
    The one and only Dave Collins ladies and gentleman. A masterer among master's, no i'm serious. He's been doing this before I knew how to wipe my own ass. Again, welcome.
  13. dcollins

    dcollins Guest

    And thank you for that image, Michael!

  14. Michael Fossenkemper

    Michael Fossenkemper Distinguished past mastering moderator Well-Known Member

    I just read my post. It should say a master among masterers. Damn that devil Scotch. Anyway, I'm off for a bit of R&R. I'll be back next week, unless I get eaten by a shark. Please moderate yourselves... Like I do anything in the first place. Now where is my sunblock?

Share This Page