13 November 2008

Think classical music mastering does not employ clipping? Think again


This is a waveform plot from the opening two seconds of the third movement of Bela Bartók's second piano concerto, conducted by Pierre Boulez, recorded in this decade, and released by Deutsche Grammophon in 2005. There is an opening drum hit, shown here, that is fairly unequivocally clipped near 0dbFS for 121 samples (2.7 ms). This is a large length of clipping by most standards.

In many music listener's minds this would be considered a gross mastering error. But the sound quality notwithstanding is spectacular, and the long-term loudness plot shows no signs of hypercompression (or indeed, perhaps any compression): the peaks of the music are merely being sawed off. However, I have no independent proof showing that the recording has not been compressed in other ways.




A very similar style of mastering can also be found on two other recent Boulez discs: one of Varèse, and another with his own ..explosante-fixe... and Notations (the latter played by Aimard). These recordings consistently brickwall-clip at or near 0dbFS, for between 4-100 samples, but otherwise are mastered clean as a whistle. But another recent DG CD of mine (Aimard's performance of Bach's Art of the Fugue) has no clipping whatsoever.

It's important to note that, as I've mentioned in the past, drum transients are perhaps the kind of signal most forgiving of clipping/limiting. As they are already very spread out in the frequency domain, the added smearing from this kind of clipping could be rather effectively masked. Listening to this music, there is no "snoking gun" kind of artifact that lets me say with certainty that this distortion is audible.

Nevertheless, that DG would choose to make this sort of compromise in their modern releases is troubling. I used to consider Boulez's recording of Amériques one of my reference tracks for critical listening; I'm considering searching for alternatives now.

Original thread on HydrogenAudio.

02 October 2008

Some clarifications on "Lars's Paradox"

From what I have heard of the CD master of Death Magnetic versus the GH3 mix, the GH3 mix is quite superior and the CD master is inferior even to other contemporary records. In that I'm pretty my in agreement with most other commentary.

That said, I certainly speak for nobody besides myself when I say that. My musical tastes, are, shall we say, immodest. My idea of a song with real dynamic range is the recent Boulez/CSO recording of Varèse's Amériques, or perhaps the Autechre and Hafler Trio collaboration æo³/³hæ. Or Mahler 3. It's to a certain degree ironic that we are debating relatively minuscule differences in dynamic range compared to stuff like that.

While many people apparently agree with my impressions of DM, many people don't. Look at the roadrunner thread below, or the comments for this YouTube video, or any number of dreck threads on metallicabb.com, and you'll find at least a few people who either do not mind the CD or believe it is better than the GH3 mix. It's been pointed out that some of their thinking is rather stupid - "this is what metal is supposed to sound like! you aren't a true metal fan if you don't like the CD mix! Roll over and die if you don't like loud music, pops!" - etc. But spaced between that are people who are saying, well, the CD sounds just fine. And a lot of people seem to have a problem with that - they do not understand why people would prefer music that is of far higher distortion than necessary.

I really can buy the argument that some people - artists and listeners alike - really are looking for this kind of distortion. Listen to some samples of Times New Viking's Rip It Off , and then marvel at the adoration it has received in some circles of the music community (and put the gun away - I know you hate Pitchfork, but hear me out here).
The layer of fuzz works like a security blanket-- a way of creating not just a distinctive sound, but of putting up an awning of safety over them and their listeners. Only the slightest bit of straining brings you to the pop virtues of these songs, on the band's own terms. Sure, it's an affectation, but its just another way of using the studio as an instrument in a way that makes these songs more intimate by design-- for better or worse, you can't sell a Volkswagen with a Times New Viking song. If cleaner production means truckloads of new bands who can summon their influences with little effort, and even less enthusiasm or creativity, then I'll stick with my tinnitus, thanks.
It's like I've said elsewhere: where do you draw the line on artistic intent? Where do you draw the line on unlistenability? Would people seriously believe that Venereology would sound "better" if Merzbow didn't use as much hard limiting? What kind of limits are acceptable on some genres of music when music in other genres would completely obliterate them?

Second-guessing the musician is easy, and occasionally even accurate, but it can also be cheap and unpersuasive. If mainstream production/mastering practices are being called into question, yet the musicians's music itself is not, the musicians will always set the terms of the debate. Examples abound of artists who seemingly add distortion for distortion's sake - Billy Corgan and Igga Pop are two examples of people who helped produce records from some time ago that were reviled for their lack of dynamics and ear-piercing distortion (Zwan's Mary Star of the Sea, in Corgan's case).

If you're not prepared to put your money where your mouth is, and stop buying music from the bands you love with the mastering you hate, then you will need to empathize with those artists, and those listeners who agree with their decisions, and truly understand what's going on in their heads comapred to yours. Only then will you be able to reconcile their musical tastes with your own, and hopefully, support a solution that makes everybody happy. Otherwise, Metallica and their business associates will continue to sleep quite soundly over all of this.

30 September 2008

Lars's Paradox, or, Everything You Know Is Wrong

"Listen, there's nothing up with the audio quality. It's 2008, and that's how we make records... Of course, I've heard that there are a few people complaining. But I've been listening to it the last couple of days in my car, and it sounds fuckin' smokin'."
Look, people. The dude isn't fucking deaf. Rick Rubin is also, contrary to popular opinion, not deaf (he owns a rather nice hifi, in fact). Metallica as a band is not deaf. Vlado Meller is not deaf. Millions of music listeners are not deaf. And now quite a few people are coming out the woodwork and saying that Death Magnetic sounds just fine, thank you very much. They too are not deaf.

To suggest otherwise, or to suggest that something is inherently wrong with the way they are listening, is merely fallacious smearing, and honestly, unintelligent. Continuing to insist that music products like Death Magnetic are not of a sufficiently high quality without further proof - especially in the face of #1 sales - is only going to continue the abject apathy that the rest of the music world seems to treat this whole issue with.

Certainly, Rick Rubin knows exactly what he's doing when he produces records like this, and he is quite certain in his belief that it is towards delivering a superior product, as his interview with Michael Fremer made abundantly clear:
Ultimately, if you listen on a car sound system or in the mainstream place where most people listen to music—cars, boomboxes sound systems you get at (chain stores), and if you “A/B” the less compressed version to the more compressed version, you pick the compressed version... Even in a good car stereo. We do shoot-outs all the time. I master with as many as five different mastering engineers mastering the same album and then we “A/B” them and it’s interesting, Vlado wins nine out of ten times, and he claims it’s not him. He’s got technology in that room that’s a 2 million dollar mastering suite that other people don’t have. All I’ll tell you is that my whole job in life is to A/B things, that’s all I do, and for some reason, I don’t know that what he’s doing is necessarily the best, but I haven’t heard anything to beat it and we try.
That the album distorts needlessly is established beyond a reasonable doubt, thanks to mastering engineer Ted Jensen's comments, and comparisons with the vinyl. I haven't bought the album, but I have listened to the free clips from Metallica's web site, and the YouTube GH3 rips, enough to know that I'd prefer the GH3 versions.

But let's have some perspective here. The truth of the matter is that this is a serious counterexample to the entire narrative of the "loudness war": that, despite diverse objective and subjective evidence that modern hypercompressed mastering styles degrade sound quality and music appreciation, the vast majority of music listeners, at all experience levels, at least continue to buy such purportedly terrible masterings, and may even prefer them to less compressed styles. I am going to call this Lars's Paradox, since Lars Ulrich, belligerent bastard that he is, has managed to wade neck-deep into the middle of this like he always tends to do. But whether due to a similar level of belligerence, or devil's-advocacy, or whatnot, I'm actually going to take his side here for a minute.

I believe any fight against hypercompressed mastering in the "loudness war" will founder until this paradox is resolved. More concretely, and extending to other issues, I am claiming the following:
  • Claims of the hypercompressed style resulting in reduced musical enjoyment are completely unproven except on personal, anecdotal, and therefore meaningless, grounds. Real studies need to be done, in real listening environments, to show that the application of hypercompression is a detriment to popular music and the popular music industry.
  • Objective evidence is inaccurate in arguments regarding mastering. Objective evidence cannot prove statements about enjoyment. Such analyses must be more explicit in their relationship between the music, the dynamic range, and the dissonant distortions if they are to be ultimately taken seriously. Waveform plots, ReplayGain, RMS, and pfpf are all highly deficient in one way or another here.
  • (Lars's Paradox) Evidence suggests that the hypercompressed style is preferred by at a large amount, and probably most, of the popular music listening population. Both audio professions and untrained listeners are making this preference. For the uncompressed styles to be taken more seriously, it must be shown concretely that this preference is based on faulty measurements, or is otherwise false in meaningful and important ways.
As long as these points stand, the argument against hypercompression will remain fundamentally flawed, and popular music will continue to be released in the hypercompressed style. Regardless of how many petitions get signed. Marginal releases like on vinyl and high-res formats obviously don't follow this logic as much, nor does classical and experimental music, etc. By and large, those are not popular genres or (yet) popular formats, and this discussion revolves largely around popular music. But there's simply no hope for popular CD/iTunes releases to follow any different mastering style as long as these issues exist with this whole argument.

(I have my own ideas, revolving mostly around psychoacoustics, for resolving the paradox, but they are as yet unfinished.)

Update, October 1:
Debate on the new JusticeForAudio.org forums.

Update, October 2.

17 September 2008

Waveform Plots Considered Harmful

(Revision 2.)

One of the most commonly used audio measurement tools used today is the waveform plot. This is the graph of the audio signal versus time. It directly relates the amplitude of the signal to the various parts of the musical piece, and seems very easily interpreted. It is also extremely sensitive to changes in mastering, and so is the tool of choice used for illustrating "the loudness war". From sound editor screenshots to animations to elaborate, egg-in-a-frying-pan-style "this is your music on drugs!" Youtube videos, it has become something of a mascot for hypercompression.

Unfortunately, it can also be highly misleading. In general, waveform plots cannot be solely trusted as an evaluator of sound quality. Use caution when using them, because they may lie to you.

An Example: Vinyl waveforms can look better than they really sound
The most common point made with a waveform plot is to prove or disprove the existence of clipping, or more generally, hard limiting. Clipping refers to a music signal that is clamped to a fixed magnitude if that magnitude is exceeded - the peaks of the music are "clipped" off. Hard limiting is roughly the same concept - clipping is a form of hard limiting - but allows for more flexibility in how the fixed magnitude is approached. Typically, a hard limiter will allow for a softer transition between the "undisturbed" region of the music and the "limited" region.
The outer shape of a waveform plot shows the peak level of the music over time. If that peak is at exactly the same level across an entire song, down to a fraction of a dB, it is believe to be good evidence that a limiter was applied to the music; the flatter the peaks are, the more limited the music is, and thus the more distorted the music is. Conversely, the more ragged the peaks are, the less distorted the music is.

Rather than describe an elaborate explanation as to why this is not true, it is far easier to just find a counterexample. Here's a waveform plot of a song from the album Mirrored, by Battles, in both CD and LP versions, loudness-equalized.

(Battle's Leyendecker. White: CD version amplified -7.44db. Red: Vinyl version. Recorded with Technics SL-1200, AT-OC9MLII, flat transferred with Yamaha GO46 at 44.1khz. 2M samples of left channel at +4M samples from start of track. Time axis in seconds.)

"Excellent! The vinyl really is better!" you think. Visually, the CD is quite obviously "hypercompressed", and the vinyl is clearly not - in fact, the vinyl peaks around 6.6db higher than the CD does, once the two tracks are loudness-equalized. Based on this sort of plot, 99% of the music listeners who care about dynamic range in their music would believe the mastering on the vinyl release is superior.
But 99% of music listeners are dead wrong.
(Same plot; zoomed in to 27.43-27.44s)

Vinyl is full of linear distortions and noise sources that do not exist on CD, and so the waveforms rarely if ever match at short time scales, even if the mastering is the same. Such is the case here. But it should be quite obvious that the clipping that exists on the CD also exists on the LP. The "flat" regions on the CD very closely match the "flat" regions on the LP. [1]

This is fairly incontrovertible proof that the vinyl release of Mirrored originates from masters utilizing a similar amount of dynamic range compression as exists on the CD. And yet, the first waveform plot appeared to clearly indicate a higher dynamic range. In the case of vinyl specifically, this conclusion can be wrong for a number of reasons:

  • The recorded vinyl waveform is not sample-aligned with the CD waveform. Intersample peaks that are not visible on the CD waveform suddenly become visible on the vinyl waveform. In exceptional cases this can artificially raise the peak level by a few dB.
  • Variations in the frequency response of the vinyl system (both in recording and playback) can artificially raise peak levels. One particularly strong culprit here is low-frequency rumble at the tonearm-cartridge resonance (around 10hz) which can easily dwarf all the other musical content on the recording. (In this comparison, the rumble was filtered out.)
  • Tracing and tracking error in the tonearm system can artificially raise peak levels.
A similar situation exists with FM radio, which is also compressed very aggressively, although waveform plots of recordings do not show an excessive amount of limiting. But applying the preemphasis, resulting in a signal analogous to what is actually transmitted, results in a much more obviously limited waveform.

Another Example, with a CD
Metallica's Death Magnetic is being widely criticized as one of the most sonically unpleasant popular records of recent memory. And yet, its waveform plot, while ugly, is not perfectly flat:
"My Apocalypse"; CD; source.

Many albums that visually appear worse than this sound much better.

Why can waveform plots lie? Blame your ears

The human ear may be relatively insensitive to limiting, if it only happens a few times a second - for instance, if only the percussion is affected. Bob Katz has commented in Mastering Audio that in regards to peak limiting, "a rule of thumb is that short duration (a few milliseconds) transients of unprocessed digital sources can be reduced by 4 to 6 dB with little effect on the sound." Those people who would worry about 10-20 sample runs of clipping on CDs should note that 1ms = 44 CD samples; examples of hard limiting become exponentially harder to find as the number of consecutively limited samples increases. Mastering engineers use peak limiting all the time because, in all honesty, the human ear ear often lets them get away with it! In other words, clipping that may appear blindingly obvious on the waveform plot may not be audible.

On the flip side, when limiting occurs with periodic signals - like those emitted by most non-percussion instruments - it becomes a form of high-order distortion, and may become very, very audible. In the worst case, limiting of very few samples at a time (1-5) may be audible.

Furthermore, different forms of hard limiting have different effects on the sound quality. Clipping is merely one of the most dissonant forms of hard limiting. A large market exists for high-quality limiters that remove as much of the peak as possible, while maintaining as much of the sound quality as possible. And yet all of these limiters will appear more or less the same on a zoomed-out waveform plot. How can can sound quality be evaluated from such a plot when one can't use it to tell apart different forms of limiting?

When limiting is tastefully done, by a professional mastering engineer, it can negligibly distort the music while making it much more enjoyable for those of us with less expensive or desirable listening environments. In this situation, the effect of more general forms of dynamic range compression may be more objectionable, in that the reduction of dynamic range is worse than the addition of light amounts of limiting distortion.


How can I tell if one master is superior to another if waveform plots are bogus?

Unfortunately, while many alternatives exist to the waveform plot to measuring mastering quality, they all have major downfalls. None of them are trustworthy.

  • Many people use ReplayGain track gain values as an estimator for the dynamic range of the music. Most importantly, it is easily fooled by global changes in gain - so that the "fake" dynamic range of the Battles recording above would completely fake out ReplayGain. Certainly, ReplayGain values place limits on how much dynamic range may exist in the music, and it can be used to guess a lot about the mastering, but it does not, in fact, actually measure dynamic range, nor does it measure distortion. Many albums considered great-sounding from the likes of Radiohead and Gorillaz tend to Replaygain in the -10dB range, which many people would consider "hypercompressed".
  • Audio engineers use an "RMS" value that is conceptually about the same as ReplayGain, and shares its faults. However, it is an acceptable figure of merit proving that Iggy Pop is a crappy producer.
  • pfpf was more or less explicitly designed for this sort of thing, but only in the context of changes in dynamic range - not in terms of clipping, or any kind of timbral changes. This approach should be fairly good teasing out changes in dynamic range compression, but quite insensitive to limiting. Also, pfpf is still sort of half-baked, and it's not clear yet how close the long/medium/short term numbers need to be before concluding that two samples are of the same master.
  • The Sparklemeter was designed by somebody else on somewhat similar lines as pfpf, but specifically relating to measuring mastering quality. See that thread for my comments.
  • Some people are content with using the "Peak Level" result from CD audio rippers such as EAC as an indicator of audio quality: the idea being that CDs with a peak level lower than 99% run a much lower risk of hard limiting than those at that peak level or above. This is wrong in so many ways it's hard to count. It is, quite simply, the least accurate method possible of evaluating mastering quality.

Perhaps the most accurate method of evaluating mastering quality, though, is the simplest: Asking the mastering engineer. They, of course, would know best.

Another method is to simply use your ears. Know what clipping sounds like, and what other forms of hard limiting sound like, etc., but also evaluate your own music collection's sound quality, and investigate the mastering techniques used with its songs.

What is to be done?

  • Avoid the use of zoomed-out waveform plots to prove points about sound quality. They convey less information than you might think, and they are easy to misinterpret.
  • Do not trust the sound quality of a record simply because it looks good on a waveform plot. The ear is not an oscilloscope. Waveform plots are an informational tool, but the only relate to the perception of hearing in an abstract sense. There are plenty of ways that a good-looking waveform plot can sound terrible!
  • Avoid using any numeric measurement for evaluating audio quality, unless you understand exactly its exact meaning for audio perception. Most numeric tools today are fairly flawed. They can be used to make meaningful statements about mastering quality in specific circumstances, but they can also make lots of meaningless or flawed statements.
  • Do not buy vinyl on mastering merits alone, unless you have information coming from the vinyl mastering engineer attesting to its superiority over other release. As a rule of thumb, the cost of a vinyl remaster is high enough that those labels that choose to remaster will make it quite clear to potential customers that they did so, and the labels that didn't, won't. But of course, just because a special mastering job was done for a vinyl release doesn't mean that the mastering changes were significant. Caveat emptor.
  • Enjoy music purely on its subjective merits, but pay attention to your perceptions and look for ways to quantify it. There's too much good music out there today to ignore because the mastering is crap. And despite the shrill cries of the hi-fi set, the sound quality of music today is still considerably better than what it was for (most of) the last 60 years. And if all the kids today have no problem listening to the music, who's to say that us old farts can't listen to it too?

    Nevertheless, reduced dynamic range and increased distortion in modern mastering are real issues. Solving them requires subjective and objective evaluations of sound quality, rigorous in their execution, to convince the audio world that this is not mere idle talk of ignorable audiophiles.
For further reading: the HydrogenAudio forums, including some recent topics on the subject, and a wiki entry on vinyl mastering (semi-maintained by me). Related thread.

Footnotes
[1] The regions of clipping on the LP version of "Leyendecker" seem to imply that it is slightly less limited than the CD version. However, the difference is so slight that it is not believed to be audibly superior - and besides, the example still breaks the myth that vinyl must necessarily not be hypercompressed.

Changes
17 September 2008: Incorporated feedback. Previous revision. Thanks to David "2BDecided" Robinson, Lyx, krabapple, and others on HA, for their feedback.

12 September 2008

Metallica's "Death Magnetic": Clips on both CD and Vinyl

Much hay has been raised about the sound quality of this album, although interestingly enough, none of it has been from mainstream music journalism (or even the blogosphere) yet. The mastering engineer has even disowned the sound quality of the record, passing the buck onto the mixing engineer, and ultimately, the band itself.

The MP3 prerelease leaks have been so commonplace (and so bad sounding) that a lot of people are buying the 2LP and 5LP versions thinking that they are getting superior sound quality. However, judging by the large amount of clipping still extant on the vinyl, they probably won't:


Image credits: hdsemaj on stevehoffman.tv. Original post.

Subjectively, some people are reporting that the warmer sound of the record is dampening the clipping somewhat, but really, that's damning with faint praise.

My recommendation is to spend as little money as possible on the release until they sell a better master. Metallica.com is streaming the album for free right now. Beyond that, buy the MP3s. Personally, I smell a rat.