Saturday, 19 August 2017

MUSINGS: Increasing the Dynamic Range of compressed audio with DSP... (And is this why vinyl DR is higher!?)


Sadly, the good doctor's diagnosis applies to too many of the recordings we listen to these days.

I mentioned last week a recommendation for July Talk's Touch album at the end of that post. There are a number of catchy and enjoyable tracks on there... However, if we put this album through the foobar DR Meter, unfortunately, we see an album with really nasty dynamic range compression - DR4. Yuck.

Hmmm... Is there any way to change that?


--- ORIGINAL album ---
foobar2000 1.3.16 / Dynamic Range Meter 1.1.1
log date: 2017-08-12 10:42:36
----------------------------------------------
Analyzed: July Talk / Touch (FLAC)
----------------------------------------------
DR         Peak         RMS     Duration Track
----------------------------------------------
DR4        0.00 dB    -7.17 dB      3:35 01-Picturing Love
DR3        0.00 dB    -5.91 dB      3:06 02-Beck + Call
DR5        0.00 dB    -6.93 dB      3:48 03-Now I Know
DR3        0.00 dB    -4.37 dB      2:27 04-Johnny + Mary
DR7        0.00 dB    -9.98 dB      4:35 05-Strange Habit
DR4        0.00 dB    -6.38 dB      2:51 06-Push + Pull
DR3        0.00 dB    -5.17 dB      3:34 07-Lola + Joseph
DR3        0.00 dB    -5.31 dB      3:06 08-So Sorry
DR5        0.00 dB    -7.78 dB      4:23 09-Jesus Said So
DR4        0.00 dB    -6.33 dB      5:15 10-Touch
----------------------------------------------
Number of tracks:  10
Official DR value: DR4
Samplerate:        44100 Hz
Channels:          2
Bits per sample:   16
Bitrate:           879 kbps
Codec:             FLAC
==============================================

As you can see from the DR Meter readout, every track has at least samples hitting 0dB peak amplitude. Importing "Jesus Said So" into Adobe Audition 3 to have a peek at the waveform display, this is the sorry situation with that and every track on the album:


Clearly an unfortunate victim of the "loudness war" here; among others of infamy like Californication or Death Magnetic or the absolutely unlistenable Iggy Pop mix of Raw Power (DR1 baby!). Well... I guess DR4 is better than DR1 :-).

In the last couple months, I have been exploring the use of iZotope RX's "De-clip" plugin. Using DSP, we can to some extent allow software to re-expand those peaks back up. Here's what I do in batch convert:


As you can see, there are 3 simple steps... Use the "Gain" DSP to lower the volume by -6dB. Then use the "De-clip" plugin with the built-in preset of "Extreme Analog Clipping" to restore the clipped and compressed parts by up to around 6dB or so. Finally, since highly compressed material like this doesn't deserve to be saved back as 24-bit audio, I dither it with iZotope RX's MBIT+ just at the "lightest" noise shaping, and "low" dither amount setting to 16-bits before saving back to FLAC. It's possible that strong noise shaping could have been used already on the music tracks so I use the least possible in the final step so as not to accentuate the high frequencies.

And here is the result of that "Jesus Said So" track:

And if we do this for the whole album, looking at the DR Meter:

--- DE-CLIPPED album ---
foobar2000 1.3.16 / Dynamic Range Meter 1.1.1
log date: 2017-08-12 10:46:27
----------------------------------
Analyzed: July Talk / Touch (De-Clipped, FLAC)
----------------------------------
DR Peak RMS Duration Track
----------------------------------
DR9 -0.48 dB -13.15 dB 3:35 01-Picturing Love
DR8 -0.70 dB -11.90 dB 3:06 02-Beck + Call
DR9 -1.86 dB -12.93 dB 3:48 03-Now I Know
DR8 -0.01 dB -10.35 dB 2:27 04-Johnny + Mary
DR10 -2.11 dB -15.98 dB 4:35 05-Strange Habit
DR8 -0.02 dB -12.40 dB 2:51 06-Push + Pull
DR8 -0.42 dB -11.17 dB 3:34 07-Lola + Joseph
DR9 -0.11 dB -11.28 dB 3:06 08-So Sorry
DR10 -1.05 dB -13.76 dB 4:23 09-Jesus Said So
DR8 -0.81 dB -12.33 dB 5:15 10-Touch
----------------------------------
Number of tracks: 10
Official DR value: DR9
Samplerate: 44100 Hz
Channels: 2
Bits per sample: 24
Bitrate: 1497 kbps
Codec: FLAC
===================================
As you can see, the DR has expanded from DR4 to DR9 - an average of +5dB; nice.

Zooming in a bit, we can see the clipping resolved and subtle nuances extrapolated into the waveforms:

The "De-clip" DSP module is meant to be used in the studio when recorded tracks suffer from volume overloading and digital clipping such as when vocalists get a little close to a microphone for the ADC recording settings. For our purpose, it's analyzing the original file and extrapolating the extremely loud and clipped points, approximating what the peaks "should" look like. It will do this by filling out the peaks into the overhead provided by the -6dB attenuation in the first step.

How does this sound? Well, if you play the files directly, it will be obvious of course! The "de-clipped" version will be obviously softer (by about 6dB) and you'll need to push up the volume to compensate. The effect is subtle if you use ABX Comparator to equilibrate the volumes however. Obviously we are dealing with the same source file so it's not like this will make as much a difference as a true remix or remaster from an original unclipped version.

There are some benefits apart from the subtle de-clipping effect. For those with DACs that overload easily, this will reduce the distortion with the loud parts. "Intersample overload" from oversampling will be minimized or eliminated. Also, by reducing the overall volume, lossless compression software can do a better job with reduced file sizes. For example, this July Talk album went from 243MB down to 220MB after the de-clipping using FLAC -8 compression.

If you have iZotope RX, do play with the De-clip DSP module. I've found that the preset "Extreme Analog Clipping" works well but you can certainly increase or decrease the parameters. I've done this with a few other albums like some of Imagine Dragons'. For example, Smoke + Mirrors (which went from DR6 to DR9) and Night Visions (from DR4 to DR9). It can be applied to many modern pop songs; for example my daughter liked Miley Cyrus' Malibu single - DR5 to DR9 baby! Notice that with default settings shown here, the final DR value tends to be around 9 (although higher like DR11 can be achieved as shown below).

BTW: That Miley Cyrus single also had quite a notable DC shift fixed with high pass filtering.

Again, I'm certainly not saying this will truly "fix" the sound of distortions in LOUD music which is "set in stone" and already affected by the extreme mastering volume. Rather, it might in some situations make the sound a little less irritating on a hi-fi system...

Have fun! If you try it, let me know what you think on your system. Also, I have not looked around, but there might be free software out there that can be used. Let me know if you find free solutions!

--------------------------

As I was tinkering with the above, I was also thinking about this whole DR business and vinyl rips. Could this be at least part of the explanation of what is happening in vinyl playback to create the typically higher "DR" measurements with vinyl rips compared to CDs? Remember, if we poke around on the Dynamic Range Database, we generally see vinyl rips measuring higher in DR than the CD or other digital counterpart. In fact, if we search the database for "vinyl", you almost never will see a true LP rip less than DR10. In the past, I've touched upon this tendency here and here.

As an example of an obviously digitally sourced and compressed album, the Bruno Mars' XXIVk Magic album has a DR7 whether it's the CD or 24/44 HDtracks "hi-res" download when we search the DR Database. But notice that the vinyl rip has a DR12 rating!

Remember what is involved in preparing and producing a vinyl version of a digital album though... It needs to be "remastered" to a certain extent by introducing the RIAA EQ curve and various changes like mono-summing of low frequencies. Whether prepped digitally or in the analogue domain, that highly dynamically compressed CD/Hi-Res file would likely go through gain reduction, RIAA EQ introduced, plus whatever other tweaks to optimize for a vinyl presentation (like bass and final volume adjustments - this is important to adjust the 'pitch' of the groove). No matter what, a digital recording at some point would also go through a DAC for analogue conversion on its way to the vinyl cutting lathe - audiophiles should be curious as to the quality of the DAC device used in the studio...

I suspect this whole process affects the digital clipping and peak limiting. Furthermore, remember mechanical devices like the cutting head stylus and LP playback cartridge cannot instantaneously stop nor remain precisely accurate like "perfect" digital ones and zeros. Clipped and peak limited samples will never result in a "flat top" appearance; the peaks will always "round out" with vinyl playback, similar to how the "De-clip" module will extrapolate those peaks for us.

Going back to Bruno Mars, if we run the De-clip process above on the song "24K Magic", we indeed see that it adds a bit more DR to the waveform:

Running the original album and comparing the de-clipped output through the foobar DR plugin for a reading:


Aha! DR went from DR7 to DR11 on average across the whole album! Close to the DR12 from a vinyl rip as per the DR Database.

So, is this the mechanism whereby without using a proper high dynamic range source, the vinyl playback results in higher DR measurements? I suspect so to some extent. Since vinyl cutting and playback will then add their own distortions and noise, it will sound different when we sit back and listen to the final product versus the original loud digital "studio master". Coupled with the DR measurement looking "better", it adds to the mystique of analogue playback in a positive fashion even if it were just a low-res source to begin with (like this Bruno Mars album).

The bottom line is this - within the digital domain, we can use tools like the "De-clip" DSP plugin in iZotope RX to approximate and reconstitute severely dynamically compressed recordings and clipped samples hence improving the DR result. And when it comes to vinyl, IMO, just because a vinyl rip has higher DR does not mean that it must have originated from a superior master that was any less compressed. I strongly suspect that the processing to get the music on vinyl coupled with the mechanical effects of cutting & playback will expand the apparent DR. This effect might be audible and beneficial in some circumstances. This is consistent with Ian Shepherd's warnings about not measuring vinyl with the TT/DR Meter from 2013.

Listening to the vinyl rip and equivalently processed digital side-by-side at approximately the same volume would be the proper way to adjudicate preference.

As I noted above, we generally do not see DR<10 with vinyl rips. Although for high-fidelity audio, we generally want to see higher dynamic range measurements as a proxy for natural sounding recordings, it's worth remembering that some artists are not aiming for this. Some might actually want the distortion and dysphoric harshness of say DR2 for artistic effect. While I may find little pleasure in this artistic choice, one could see the inability of vinyl to offer this level of severe dynamic range compression as a limitation of the format!

----------------------------------

So, in the September issue of Stereophile (Mytek Manhattan II review), Herb Reichert says "DSD and high-resolution downloads never sound completely right or real to me. MQA does." Interesting opinion especially since he mentions listening to an "MQA-encoded CD" in the next paragraph (!). Go try the MQA vs. Hi-Res Blind Test for yourself and let me know what you think. Remember, you only have until September 8th to get the results submitted to be counted.

Thanks to all those who have responded so far... Much appreciated! :-)

Listening to Freddie Mercury & Montserrat Caball√© Barcelona tonight reflecting on the tragedy and worldly events recently.

Enjoy the music.

Addendum:
Thanks Chip for this image of the dbx 5BX-DS (I see the scanned manual online here). Looks like a very useful device these days and still goes for about $1000 used in good condition!


55 comments:

  1. I'm fairly convinced the inflated DR scores we see on vinyl rips is mostly down to the effects of the filtering (whether it is simple high pass to cut the bass, or the elliptical filters to progressively sum the bass below a given frequency to mono). The following video demonstrates the phase rotation effects of filtering that can "fool" us into thinking there are dynamics where there aren't:

    https://youtu.be/cns9mZFtVLk

    ReplyDelete
    Replies
    1. Hi Chris,
      Thanks for the video link. Yeah, I think it could be right. A few years ago I tried to model this with some filtering... However, I wasn't able to fully get the same effect with the magnitude of DR change like here which is more like a "peak extend" kind of effect.

      I'd be curious to see if anyone can string together a few DSP instructions to model what vinyl remastering looks like to show the DR increase.

      Delete
    2. I don't know anything about DSP settings and whatnot, but I've fooled around with filters in Adobe Audition and was able to recreate the high DR scores of vinyl rips from the the compressed digital masters. I've written about it on my blog. Some times you get the exact same "false peaks" from a filtered digital version as are seen in the vinyl rip. Just as an example of one I looked at recently, here are some waveform screengrabs of the song "Cavalier" by James Vincent McMorrow from the album "Post Tropical" (I ripped the track from vinyl myself specifically for this comparison):

      https://ptpimg.me/89gm88.png
      https://ptpimg.me/s442nh.png
      https://ptpimg.me/v9v0ib.png

      This is highly repeatable. Sometimes you even get one weird standout peak on a vinyl rip that shows up in the filtered digital version. Take this example of the track "A Brain In A Bottle" from Thom Yorke's solo album "Tomorrow's Modern Boxes" at around the 4:26 mark:

      https://ptpimg.me/z7uhuq.png
      https://ptpimg.me/ju2ku3.png
      https://ptpimg.me/352501.png

      As you might imagine, just by looking at the waveforms you could guess the DR scores would match up. And of course, they do, usually within one point. My guess is the DR score is inflated due to these "false peaks" from phase shift effects and a lower RMS value from rolling off a little bass. It doesn't take much to turn DR5 or DR6 into DR10 or DR11.

      Delete
    3. Now imagine the havoc that digital bass management filters are wreaking on audio mastered without any headroom. You may not always hear the clipping, but trust me, it's there. Like try running the Declip algorithm without applying -6dB attenuation first...

      Delete
  2. Hi Archimago - Really interesting theory about the relative vinyl DR! ...First off - I Tweeted you detailed pics/info of the DBX-5bx Dynamic Range Controller (since there is no way to post them here) which I highly recommend. I too use Izotope RX5 in a similar manner, and find I can further build on the expansion quality by playing around with Deconstruct. It's trial and error depending on the material but it can do wonders in some situations boosting Harmonic level while reducing or maintaining Noisy level. My guess is that some of the more irritating Compression, is where a voice or lead instrument gets compressed down into the noisy material, soo the Deconstruct can mitigate that a bit. I sometimes use it in reverse (boosting Noisy) to add more grind to string sections that seem too softened in the mix. On programs that are important enough to me, I go through (after dropping levels overall as you do) and use Corrective EQ to manually boost areas that were over-compressed. In short, I highly recommend Izotope to anyone who cares enough to take the time out to work on their audio. It is IMO head and shoulders above other available software at a reasonable price. Now a little about the DBX-5bx - since some of you youngsters here may never have heard of it... It is hardware that works by expanding downward only - lowering the levels of already quieter material (transition level and rate are configurable), so it is complimentary to the process of trying to reconstruct the louder material back up with Izotope. The Impact Restoration function on the DBX fixes transients on a micro level that Izotope doesn't address AFAIK. Can the DBX, being hardware based, introduce some noise or artifacts? Noise - yes (but low level and VERY easily removed with Izotope.). Artifacts - no. (Izotope is far more likely to leave artifacts, in my experience, if not used carefully). Using both Izotope and the DBX together, the results are great - and a lot of work! There are some older audiophiles who had negative experiences with cheap or early companders and will scoff at the 5bx, having never actually heard one. (Only 2000 were made and they are quite expensive.) I would hope that someday, someone like Izotope will add a function that can accomplish similar results digitally, but for now, the 5bx is still the Cat's Meow IMO in rebuilding DR with realism!

    ReplyDelete
    Replies
    1. Thanks Chip.

      I had only had passing knowledge of devices like the 5BX; thanks for the scanned image! Wow, looks like you've been playing with this stuff for years :-). I hope you've documented the specifics of some of your workflow over the years. Thanks for the tips with Deconstruct... Will give this a try when I have time.

      Delete
    2. btw - Izotope Neutron also has some great features for playing around with pre-existing mixes, which includes a Transient Shaper plugin that can get even more impact out of a recording than the DBX. However, it only operates over 3 independent bands (since it was really designed to run on a single recording track at a time), while the DBX breaks the material into 5 independent bands simultaneously. But the big advantage to the hardware DBX is that it sits in the preamp's tape loop - so can be used during direct play of analog or digital material with the push of a button on the remote. The software based plugins obviously need the music either preprocessed or playing through Izotope or Audition on a computer.

      Delete
  3. Ouch, that Izotope s/w is pretty pricey for a pretty simple DSP process (seems to me). Here's a free alternative for foobar: http://antress.blogspot.com. Has anybody tried it?
    They also have a compressor, which might be useful for those of watching movies without an acoustically isolated room.

    ReplyDelete
    Replies
    1. Hey Phil,
      Very cool VST plugins! Thanks for the link. Will have to look at it more and see how they work out.

      iZotope RX 6 standard is alas around $400. Meant to be for the home studio guys so does cost some money... I see that the RX 5 Standard can be had for $300 and that will be more than enough.

      Delete
  4. In Audacity I think you can use "amplify" (with negative gain) + "clip fix".

    Marco

    ReplyDelete
    Replies
    1. Hi Marco,
      Thanks for this tip... I'll have to give this a try on Audacity.

      In the past I did play with similar technique with Adobe Audition but didn't get very good results.

      Delete
    2. Also free, but more difficult to use, is Sox with its "gain", "compand" and "mcompand" effects.

      Delete
  5. Couple of links... If you're an audiophile, then the quality of the algorithms doing your DSP matters. It's not "all created equal" and Izotope is certainly one of the leaders in that regard. Personally, I think their Essentials Bundle at $199 is an excellent deal for home tweakers: https://www.izotope.com/en/products/bundles/elements-bundle.html
    But here's something FREE and REALLY cool from Izotope - a game-based audio production class: https://www.izotope.com/en/company/press-room/press-releases/2016/izotope-announces-pae.html

    ReplyDelete
    Replies
    1. Before you know it, you'll be lusting after one of these: https://www.youtube.com/watch?v=5pLz8oHmopg

      Delete
    2. What a nice toy! However, no touchscreen can replace physical control knobs. Actually, I just recently bought a MIDI-controller for tactile sensation and faster processing in Lightroom. :D Something like: https://www.youtube.com/watch?v=8dXGX8y2fY0

      A welcome addition to working with fingers and precise stylus on a touchscreen!

      Delete
  6. Hello Archimago,

    Thanks for this! Very interesting, indeed.

    I had the chance to play around a bit on a friend's iZotope RX 6 but I cannot find the built-in preset of "Extreme Analog Clipping". [Default] is the only preset in his list and that is what it looks like: https://picload.org/view/rwcaocli/de-clip.png.html

    Could you please share your settings, so I can save them separately?

    Furthermore, what settings would you recommend for resampling to 48000 Hz? As you know, there are many Hi-Res downloads that are equally compressed and I generally do not want to waste disk space by storing 24-bit/88.2+ kHz files. [Default] looks like this: https://picload.org/view/rwcaocca/resample.png.html

    As far as I understand, all cover art is lost after batch processing. Too bad!

    If someone is interested, Dither and Gain should look like this (correct me if I am wrong): https://picload.org/view/rwcaoclw/dither.png.html and https://picload.org/view/rwcaoccr/gain.png.html

    ReplyDelete
  7. Here is what the stock Extreme Analog Clipping preset looks like for RX 5:
    https://picload.org/view/rwcodaar/declip.png.html

    ReplyDelete
    Replies
    1. Hi Balduin, the image Chip showed from iZotope RX 5 is the same for RX 6.

      Delete
  8. Well, I have to state the obvious and ask:

    - You should have never recommended such a shitty, amateurish and unprofessionally mastered recording in the first place

    or

    - loudness war, DR metering etc is just irrelevant and everyone is wasting his time tinkering with it. You liked the music as it was, despite being acoustically raped. So what...

    Food for thought.

    ReplyDelete
    Replies
    1. Hey Techland,
      Yeah, well, alas life is full of imperfections and things we wish could be better :-). Personally, I like the music so ultimately, I accept that no matter what I might do to fix clipping and whatnot, there's just no getting over the limitations of the sound.

      Delete
  9. De-clipping may yield nicer looking amplitude plots. It may even 'repair' clipped signals quite close to the original signal, before the peaks were cut off.
    It thus automatically increases a number spewed out by DR rating software but that's really the only thing it does.
    It 'repairs' a clipped signal.

    It does nothing for the actual dynamic range nor does it undo compression.
    Everything that is compressed can't be uncompressed unless it is known exactly what compression settings were used and with which encoder.
    And even then it is only possible to do so when the entire master has had one (known) type of compression which then would have to be run through an expander with the exact opposite expansion.
    When for instance only a drum track has had a different individual compression applied it doesn't work any more.

    For this reason alone I don't see the role the dbx 5BX-DS could play as it certainly won't have the same settings.
    The dbx device can be quite beneficial when used with tapes during recording AND playback.
    Those that ever played back a normal recorded cassette tape on dbx setting will immediatly understand.

    Alas all music that is compressed can't be uncompressed. repairing peaks will not make the music sound less compressed... a little bit 'cleaner' perhaps.

    Also the DR rating ONLY says something about the difference between the loudest signal value present on that track (can even be only a peak of 1ms during an entire track) and the 'average' signal level (calculated with an algorithm).
    That DR value is a usefull number but certainly not the only important number.

    Whether or not a recording sounds dynamic and real is determined by the ratio between the loudest en softest signal you can hear and also how loud the playback level is.
    The louder one plays the bigger the actual dynamic range you can hear will be.
    It does not change the actual dynamic range on the recording which is more or less determined by the noise floor of the recording (not the noise floor of the DAC)

    ReplyDelete
    Replies
    1. Do note that a peak of 0dB in one instrument and a -90dB signal from an instrument can occur at the same time. That -90dB signal is inaudible when the 0dB peak is reproduced at 90dB SPL.
      One would have to play back that 0dB signal at 120dB SPL to be able to hear the -90dB signal.
      Because only then it would be 30dB SPL and may just be barely audible when they are in a different frequency band and thus is not being 'masked' by the louder signal.

      When music is 'compressed' in the studio such a -90dB signal could be compressed (increased in amplitude) to say -60dB and would become audible even when played back at 90dB SPL. This is the goal of dynamic compression.
      You thus 'hear' softer signals better.
      Just to be clear ... dynamic compression of the recorded signal has absolutely nothing to do with compression of digital file sizes (FLAC etc)

      This compression of dynamic range is what is done to the signals of heavily compressed recordings and cannot be undone.
      It is also why Archimago found that after de-clipping the music sounded the same even though the signal amplitude and waveform has undergone massive changes (5dB is massive).
      Simply because the dynamic range did not change.
      Do note that the decrease of overall volume is VERY audible and when not corrected will actually decrease the dynamic range you will 'hear' as signal that were barely audible will now have become inaudible.
      You need to turn up the volume by the same amount of dB's.
      Only then you will hear some peaks slightly louder than before (as only the peaks have been 'repaired', the dynamic range (softest signals) have not.

      This is something that the DR value does not show at all.
      What a small DR value does indicate is that most likely someone has been faffing around and destroying the actual dynamic range (using compression and possibly clipping) of the recording and this can't be undone !

      If you like the music (compressed or not) and find it pleasant to listen to then the studio has done its job well.
      When it sounds poor .. well take it like it is or don't listen to it any more.
      regardless of the DR rating it has.

      Delete
    2. Re: Alas all music that is compressed can't be uncompressed. repairing peaks will not make the music sound less compressed... a little bit 'cleaner' perhaps.

      Agreed. As an ex-recording/mixing engineer, and sorry to say, almost all non-classical music has been compressed. On mixing consoles and DAW's each track/channel strip has a compressor/limiter that one can engage, both during tracking and mixdown, plus overall compression (i.e. bus compression). Plus compression on mastering. One can adjust compression ratio, attack and release times on each individual track. This cannot be undone. Here is an article that describes this in more detail: Dynamic Range: No Quiet = No Loud

      Delete
    3. "...almost all non-classical music has been compressed."

      Sadly, too often this also is valid for classical music; as I encountered with labels like Decca or Sony.

      Delete
    4. Agree boys, I certainly have not experienced miracles fooling with this. It restores a few clips, ups the DR value, but ultimately the underlying recording has been irrevocably affected by the manipulation.

      And on the vinyl side, I think this is part of the answer as to why vinyl DR always appear larger... Not because they used better masters the vast majority of the time!

      Delete
  10. Try Thimeo Perfect Declipper, it works wonders!

    ReplyDelete
    Replies
    1. Agreed. It's amazing. Crank the restoration quality to 100% on everything, increase your CPU threading. I also love the natural dynamics set at the default strength, with the flat tops setting. Play with the amplitude until you hit the sweet spot. For me target RMS is anywhere between 14 and 18. I use the vst plugin in for Jriver. Then run a conversion for the whole cd. Does amazing things!!

      Delete
    2. Interesting suggestion. Will have to check it out!

      Delete
    3. Yes, it seems to be the best all-round declipper out there. It has a different and better algorythm than the Izotope's, in my opinion. I use it as a VST plugin in Stereo Tools for Winamp, and it does wonders. By that I mean it recontructs peaks to sound more natural, but still, it´s no substitute to a good sounding track, it can only guess and emulate peaks by analysing the waveform before and after the clipping as far as 4410 samples combined (a tenth of a second). The actual breathing of the track is in no way improved, whatever is under the threshold remains unchanged. The Natural Dynamics feature works great for electronic instrumental music, but with natural drums and vocals, it enhances the sounds like "S" and "T", as they share frequencies with the snare drum and cymbals. I only used it with great results on Buckethead´s albums, which are mainly instrumental and peak limited, not heavily compressed. It cleans up the harshness in the high frequencies, and gives a little bit of boost on drums. Be aware though, some tracks are so compressed nowadays, the plugin detects a close to square wave, and will recreate an almost infinite peak. You have to limit the reconstruction to say 5-6 db tops, otherwise it will look and sound pretty strange.

      Delete
  11. Wow excellent post and that work very well and thnk the chief the vst of perfect clipper its so awesome with foobar , you have tips or just use preset?

    ReplyDelete
    Replies
    1. I personally use settings based on 'Declip, force declipped peaks to become higher' preset, I think it's better to switch 'input MP3' OFF, 'Quality/precision' to MAX (4.0) and 'Hiss restoration' to MAX (98%).

      Delete
    2. I just don't use it with foobar, but with iZotope RX.

      Delete
    3. Using the vst plugin in either Winamp or Jriver allows it to process in real-time, which is extremely useful to tweak the parameters and hear the direct affect on the sound. Sometimes forcing the peaks is better, sometimes not. Also helps in adjusting the attentuation to the proper desired volume. I noticed that there is a floor where the song starts to lose dynamics as you start to approach zero (the digital hard-limit). Trying to get it directly under that floor is key. Use your ears and then check the DR meter after converting the audio. Typically I find RMS on average from 14-18 i find is the best for digital masters. My settings vary from 30% attentuation on modern brickwalled masters to 50-60 percent on mid to late 90s releases less compression was used. One thing i like to do is run the dr meter in foobar on the release to see where the RMS lies. If it's on average 8 rms, I aim to reduce the db anywhere from 6-8 to approach the desired target, then tweak from there. Good luck, and let me know you're findings!!

      Delete
  12. Archimago, one thing that you for sure know but maybe in this case overlooked: play back the compressed/clipped music analog and record it again. Then compare the waveform as above, one time original, second time re-recorded.

    I am sure the peaks are recreated. Reason is: the DAC's oversampling filter does exactly the same as the declip tools. Flat tops, which equal invalid (above Nyquist) frequencies are brought back to normal analog looking waveforms. DAC chips often have internal headroom for this kind of recreation of up to +3 dB (even if Benchmark wants everybody to think only they have that), so if the designers of the analog output stages have not made something terribly wrong it will work.

    ReplyDelete
    Replies
    1. Yes Techland, good suggestion. I was actually thinking of doing the exact thing. Alas, work got busy and I'm currently out of town. Will give it a try and see what my TEAC or Oppo looks like.

      Delete
    2. Exactly, just as most DACs aren't capable of outputting square wave signal undistorted, so is the brickwall limiting "softened" on output.

      Delete
    3. When peaks are 0dB in the file then the DAC will clip and the reconstruction filter (the digital one before the DAC chip) can't create overs past that 0dB limit.
      There aren't many DAC's around with (active) and steep (read ringing) analog reconstruction filters after the DAC chip that would be able to do so.
      When the DAC chip does have headroom left (attenuated the signal below 0dB for instance by a PC or other source) then the reconstruction filter adds a small ringing peak (an over) at around nyquist and certainly not at lower frequencies where declippers function.
      A clipped 100Hz sinewave thus will not be reconstructed by the digital filter in a physical DAC. Instead it will show a flat top with ringing at around nyquist.
      a declipper will calculate what the original waveform could have been and reconstructs that.

      For this reason you may well get small sharp peaks of perhaps +1dB (at around nyguist) when the DAC chip has room to spare but certainly not a nice 'declipped' and 'restored' signal and most certainly not 4 to 5 dB extra 'signal'.

      DAC's don't need to reproduce a perfect squarewave.
      1: They don't exist in nature.
      2: They certainly don't exist in any music nor recording.
      3: You cannot record a perfect analog squarewave because of the anti-aliasing filter at the ADC side.
      4: squarewave signals only exist in digital files and as test signals out of a generator to see how circuits perform with that signal.

      Delete
    4. It seems you never reproduced the results known from the TC Electronics Intersample Peak tests with modern DAC chips. And modern means since at least 10 years. TC used the very first generation of DACs to show the terrible distortion results, but when publishing the papers the newer generation already didn't have those problems anymore. I regularly test DACs for that and they ARE able to output higher levels than what comes out with a proper sine wave. Up to +3 dB headroom after the filters.

      I never did the resampling test with hard limited signals, though, that's why I suggested to Archimago to perform such.

      Delete
    5. > A clipped 100Hz sinewave thus will not be reconstructed by the digital filter in a physical DAC

      That might well be. But such a signal does not exist on masters as it would sound totally distorted. A 100 Hz sine digitally limited will be rounded, not have a flat top. We should stay with the above example of music, the clippings in there are all short and thus higher frequency ones, IMHO.

      Delete
    6. A simple plot for your amusement.
      Adele, album '21', song 8 - I'll be waiting.
      Everyone who heard this album will know what loudness wars and clipping is.
      Here is a screenshot of the digital waveform:
      https://diyaudioheaven.files.wordpress.com/2015/10/adele-08.png

      That looks a lot like a clipped low frequency and is quite audible (to me anyway) as distortion.
      As you can see the lower frequency is limited but not at 0dB but slightly below. Higher frequencies are still superimposed and not clipped but may well have undergone compression.

      Have a listen yourself..

      Then listen to it via a PC where you can lower the volume using the mixer.
      When set to 100% the DAC should almost be clipping.
      Have a listen.
      Dial the volume 6dB down.
      Dial the amplifier 6dB up and have a listen again.
      Do this with an old and new DAC when available.

      In both cases, regardless of the DAC being old or newer the sound is exactly the same.
      No reduced distortion, no increased dynamics, no sound quality improvement with either the old and new DAC or settings.

      The 100Hz was arbitrary b.t.w. may well have mentioned any frequency below 8kHz.

      The Adele album certainly is not the only one with lots of clipped and heavily compressed signals on it.
      This is just one example.

      It also has nothing to do with intersample peaks either which are basically calculated values between samples and thus at a higher frequency than the nyquist of the original signal and a product of an umpsampling process. These are inaudible as they are well above the audible range by definition.

      And yes, with digital filters and processing it is quite easy to produce a physical DAC that can produce signals (generated by the processing) that exceed 0dB in the applied digital signal by simply applying digital attenuation in that digital filter so that the actual DAC chip behind it never gets a FS (0dB) signal.
      This way overs will always be repoduced without clipping. This however, is at the cost of the same amount of dB in S/N ratio.

      The damage here is done.
      Thank you mastering engineer(s).

      Delete
    7. Sorry, but I am not able to hear distortions in this song, and I think I am quite good in hearing those. Especially the bass and bass drum are perfectly clean. I use a Vector Audio Scope to reveal limiters working, something many people are not aware of how good that works. Independent from the volume the Vector Scope reveals limiting by straight lines on the surrounding prism border. With this song it quickly reveals that most of the compression is on the vocals, most prominent in the chorus and when the background singers are added. But that vocal compression is distortion free as well, to my ears.

      Delete
    8. Forgot: I use the Vector Scope in RME's DIGICheck, togetter with the Spectral Analyzer. This software also includes RMS/Peak meters that show oversample levels, higher than 0 dBFS. But can only be used when you have an RME interface.

      Delete
    9. I don't have all the fancy programs and DAC's and don't analyse nor try to correct every album I listen to.
      I just listen to them for pleasure and like the album or not.
      Most of the time I don't mind compression when done well.
      Limiting is more audible to me.
      This CD album I found to be a good example of poor mastering, looked it up and had a look at the waveform and sure enough evidence in plenty.
      Just took a screenshot to show you lower frequencies are subjected to limiting as well (again not clipping in this case).

      Maybe you have another version of the album then the CD ?

      http://www.audiocircle.com/index.php?topic=103744.0

      In general:
      Measurents and files may show limiting and even clipping yet may not always audible (to anyone)
      Compression also is not always audible (to anyone).
      Most casual listeners may even prefer compressed sound.

      Fact remains that CD album is highly compressed and limited (not necesarilly clipped) whether you can hear it or measure it or not.

      http://dr.loudness-war.info/album/view/84804

      Track 8 has the 'best' DR rating on that album.
      The limiting (not clipping) is evident though.

      https://diyaudioheaven.files.wordpress.com/2015/10/adele-08.png

      Delete
    10. Solderdude, you don't have to justify your opinion or findings to me. All green! I know your work for many years and have full respect for it. The tip with the Vector Scope is really amazing once you've seen what I mean. Because it shows the hard limiting even if the level has been reduced after that for several dBs. The limiting becomes visible easily because the VS usually draws soft and rounded lines, so straight lines are very obvious. And you get it in real-time, so can easily identify which part of the music got limited. None of this is possible with normal level meters or by looking at the recorded waveform. Maybe Archimago wants to check that out with his friend's Fireface...(I don't know how usable/similar other Vector Scope solutions or plug-ins are, sorry).

      Delete
    11. I can set my oscilloscopes to show Vectors.
      On Stereo signals it just shows a lot of activity.
      Have never looked for anomalies though.

      For those readers that are lost now, A vector-Scope shows phase differences by having one channel on a X-axis and the other on the Y-axis.
      The resultant will show a line under a 90 degree angle that stretches with the amplitude when the signal is mono.
      On stereo signals you will also see signals one both sides of the line.

      Whenever I have something hooked up again, and remember, I will have a look at typically clipped/limited signals and see what 'pops out'.

      Delete
    12. Your 'oscilloscope' doesn't work here as it will only be able to look at the signals after the DA conversion. The tool that I use works in the digital domain, with the playback data fed to the DAC.

      Delete
    13. Will have a play with this in that case:
      http://www.satsignal.eu/software/audio.html

      Delete
    14. That is even worse than your oscilloscope...

      I am not a social media guy, otherwise I would have uploaded a video to show you how a serious Vector Scope's display (RME's) looks like.

      Delete
    15. You mean something like this:

      https://www.youtube.com/watch?v=J1vd0OPNwgI

      Delete
    16. Good find! While the video is a bit stuttery (it does not show the fluid realtime behaviour of the tool as when running on your computer) it shows quite well what I meant. The outer boarders become very visible, solid straight lines, in case of hard limiting. This kind of presentation is independent from the absolute level, you can see the straight lines also on lower level signals, then more within the display area, what makes it even more useful. IMHO.

      Delete
    17. @Techland, assuming the DAC is reconstructing the missing peaks anyway, doesn't that mean that the sound we hear from playing compressed CDs does not represent the low TTDR score that the clipped file measures? That in fact, we should measure the TTDR score of the re-recorded file, and compare that with the vinyl's TTDR score? It might not be so much higher for vinyl after all!

      Delete
  13. Hi Archimago

    There was another interesting discussion on why vinyl rips will measure higher on TT meter than a digital recording on the Steve Hoffman site, even if they came from the same master. Ian Sheppard chimes in at various times further adding to the discussion.

    http://forums.stevehoffman.tv/threads/is-the-dr-database-really-accurate-for-vinyl.330706/

    ReplyDelete
  14. I don't quite agree with too much absolutism. Of course you can't uncompress material to reverse exactly what was done to it with track by track perfection. But you can recreate a more realistic sound for playback under more audiophile conditions than the mix on the CD that was packaged for mass-market playback. Both the DSP and DBX solutions are excellent at picking out the drums (cymbals, snare, and kick) which were often the first things messed with to tame a recording as well reducing the noise floor throughout. Those alone, when done carefully, make a recording sound much more live. With the software you can easily pick out zones to play with by either freq. or amplitude, or both together, or sections of the program that you THINK are the areas where the original signal was over-compressed. The question to me is not whether I can reproduce the sound that SHOULD have been captured and saved but just whether I can start with something imperfect (which is all recorded music :) and make it sound better - at least to me, with some tweaking. But it's a fair bit of work, which you have to enjoy in itself.

    ReplyDelete
  15. The Declip algorithm mostly interpolates what's above the threshold level. When I did RX3-assisted DR restoration in 2014 I used Deconstruct more than Declip and attenuated percussive elements by 2-3dB and then used (very soft) declip, but not in all cases.
    EQ could also help taking some of those nasty effects out, specifically when multiband compression was used on master pre-limiting. Usually even 1-2dB attenuation in 8+kHz region could help a lot.

    Also there was this free VST called Relife from Terry West, but it's processing was debunked some time ago. Still, it could soften some tracks for average listener.

    ReplyDelete
  16. What I really wish is that I could buy album downloads in 8 track state before mixdown. That would be awesome! I guess for SPLHCB, I'd even settle for 4 track :)

    ReplyDelete