Thursday, March 29, 2012

What Bell Labs Taught Me About Effective Design

In his book, The Idea Factory: Bell Labs and the Great Age of American Innovation, Jon Gertner offers a sweeping history of Bell Laboratiories (aka "Bell Labs" or "The Labs") that highlights its role as the birthplace of some of the 20th century's most influential technologies.

(Image credit: sixrevisions.com)

For me, Bell Labs is not an abstract American success story. It's personal. I spent the first decade of my career in the Bell Labs Signal Processor Laboratory in Whippany NJ. I can't really say I used The Labs as a springboard to change the world at large, but Bell Labs changed my world by teaching me that selfish design — designing for myself — is the catalyst for creating works that have meaning for others.

The Labs was a great place to be a young engineer. It offered a unique combination of freedom, responsibility, and access to knowledge and expertise. About 18 months after being hired out of grad school, I got the asssignment that would define my career. I was challenged to, within 30 days, design and demonstrate a prototype program for creating dataflow signal processing systems visually, including code generation.

Teletype 5620, nee Blit.
I immediately grasped in my mind what I wanted gred (as it was called) to be, inspired by months of experimenting with the Blit graphics terminal, which ran Bell Labs research scientist  Rob Pike's landmark ovelapping bitmap layers windowing system. Studying the Blit source code taught me everything I ever needed to learn about guru-class programming.

There are two approaches to design. Either make something so simple there are no obvious defects, or make something so complicated there are no obvious defects. (C.A.R. Hoare) The Blit source — compact, elegant, every element stripped to its essence — showed me that the path of simplicity not only satisfies, but also educates and enlightens.

I also came to realize, from studying designs I admired from other Bell Labs researchers, that establishing your own guiding principles for the success of a design and holding to them — selfish design — is the surest path to "fitness for use," a definition for product quality championed by our Laboratory Director, AT&T Fellow Caryl Pettijohn. If something works perfectly for you, chances are it will work for others; conversely, if something doesn't work well for you, it probably won't do better for anyone else.

Armed with these principles, I got the gred prototype for the Blit done on deadline, and it went on to become a great success with many spin-offs, the project that defined my career at The Labs. I was able to continue working on it at least part-time for the better part of 5 years increasing its capabilities and scope until it was perfect. And I can say gred was perfect because I was its #1 power user. I designed it for me. It had effective symbology, the exact number of features it needed, and I could readily defend why every feature was incorporated into the design, and why others were left out. More importantly, gred never went offline during these design iterations, and at every step it was the best solution available.

Rob Pike is famously quoted regarding his team's motiviation to invent the Blit: "it wasn't that we wanted high-performance graphics on everyone's desk; we just wanted high-performance graphics on our desks." I didn't start what has become In Aurem because I wanted everyone to have high-resolution digital restorations of their analog audio titles; I just wanted high-resolution digital restorations of my titles. And, by again selfishly staying true to my guiding principles for audio restoration, the effort has paid benefits to others as well.

            Vinyl-to-Digital Restoration #26           

Title: Building the Perfect Beast
Artist: Don Henley
Genre: Rock
Year: 1984



The same summer I set out to build the perfect visual editor for signal processing graphs, ex-Eagle Don Henley released his first solo record, a hit-making machine. The Boys of Summer became one of the gred project theme songs, eternally linked through my Bell Labs colleagues' rewrite of a line involving "a Dead head sticker on a Cadillac." I can still hear it in my mind.


© 2012 Thomas G. Dennehy. All rights reserved.


Tuesday, March 20, 2012

And You May Ask Yourself: Mastered for iTunes? Same As It Ever Was.

Apple's Mastered for iTunes process has been publicly criticized for not producing audio files that were subjectively 'closer to the CD' than standard iTunes. Turns out, the test methodology was flawed and the negative conclusion was the only one possible under the test conditions. The conclusion may be true, but is not interesting or informative.

The Mastered for iTunes toolkit (MfI) is free. Anyone can get it. I thought it would be a more interesting exercise to download the tools and process our 24-96 WAV test set and examine whether the result was closer to the source than standard iTunes. My conclusion from the exercise is interesting and informative, but not in the way I expected.

In all cases, MfI produced an AAF file virtually identical to standard iTunes. Darn near entirely identical.

RMS amplitude measured for the difference wave between the MfI AAF file and the WAV master is numerically identical in all cases to the result reported for standard iTunes. And the difference wave between the two AAF files in each case is virtually silent, modulo an occasional burp or murmur. The two files may not be exactly alike, but the difference does not reflect different approaches to processing the audio source.

What do we make of this?

  1. The afconvert program supplied with Mastered for iTunes is the same afconvert program under the hood at iTunes. The Mastered for iTunes tools do not a priori produce better-sounding compressed audio files. According to Apple's white paper, the MfI version is instrumented to optionally produce additional information about the output files, most notable the presence of clipping (sample values outside the [-1, +1] range truncated to fit).
  2. If you are a professional mastering engineer, you already have tools that can detect the presence of clipping in sound. Heck, I am a non-professional doing analog-to-digital audio archiving and restoration at home, and even I have tools that can detect (and allow me to correct for) the presence of clipping.
So mastering engineers have always had the tools and technique to create master recordings optimized for compression, the same way they have created unique masters for other formats, like CD and SACD. By offering transparency into their mastering process and with the carrot of a premium certification in the world's #1 music retail source, Apple is now encouraging the music industry to do it.

Some in the industry have called this a perfectly normal development, a good thing. But as a consumer, I question the value of a label that says that experts certify they have now done what they may have silently been doing all along. Same as it ever was.

Thanks to my Harman colleagues Jonathan Moss and Rahul Misra for their invaluable assistance in data collection.

            Vinyl-to-Digital Restoration #26           

Title: Remain in Light
Artist: Talking Heads
Genre: Alternative
Year: 1980



David Byrne is one of my musical heroes. Put him together with producer Brian Eno, and it's no surprise that Remain in Light is my favorite Talking Heads studio release. I never saw them live, but the once-in-a-lifetime performances of some of this material in Jonathan Demme's Stop Making Sense are mesmerizing.


© 2012 Thomas G. Dennehy. All rights reserved.

Wednesday, March 14, 2012

'Mastered for iTunes is BS?' Bad Science Meets Rampant Retweeting

Mastering engineer and writer Ian Shepherd took exception to Apple's new Mastered for iTunes process being characterized in an interview as 'sounding closer to the CD.' So he took to YouTube and his website to prove that it does not. "Not true. Testably not true."

His result was re-blogged and re-tweeted without comment (2000+ times) until it not only became news, it threatens to become fact.

Unfortunately, his test design and logic are flawed, and the false conclusion he draws is the only conclusion possible under the test conditions. Let's take a look. [Disclaimer: I have no connection to Apple or its products.]

Basically, Mr. Sheppard used a well-known test that identifies differences between sound waves to compare a 16-44 WAV file ripped from a CD against two files.

  1. File A: Mastered for iTunes AAC of the same track professionally created from a 24-96 master, downloaded from iTunes store.
  2. File B: AAC created on his computer from the 16-44 WAV using iTunes with default program settings.
He then listenened to the files and concluded that File B sounded subjectively closer to the CD than File A. So it was "testably not true" (extrapolated from a sample set of 1) that Mastered for iTunes files sound closer to the CD than regular iTunes files. (Viewers of the YouTube video proof have to take his word for it; they can't hear exactly what he is hearing.) Test set size and possible equipment bias aside, I have two hypotheses as to why his conclusion isn't significant or surprising.

  • Hypothesis #1. Files A & B were produced from different sources. The basic iTunes WAV-to-AAC converter will create a unique result from any particular master recording of a song (varied by sampling rate, bit depth, equalization, etc.).
  • Hypothesis #2. An AAC file will have a stronger statistical correlation to its specific master file than to any other version.

If both hypotheses can be proven objectively, File B sounded closer to the CD because there was no other result possible. Mr. Shepherd's pronouncement is a tautology, a logical statement in which the conclusion is equivalent to the premise. And, as confirmed by the blogosphere and twittershpere,  another definition for tautology is "needless repetition of an idea, without imparting additional force or clearness."

My full test methodology can be found here. Using results from a sample set of three songs, we find the following:

Hypothesis #1. In all cases, the iTunes encoder produced a different AAC file from the 24-96 version of a song than from the 16-44 version, verified with the same null test used by Mr. Shepherd. The titles were chosen essentially at random from my 24-96 WAV collection and cross genres, so there is no reason to believe the result won't be repeated for any 24-96/16-44 file pair that does not have special characteristics.

Hypothesis #2. To get an objective measure of correlation, I mixed aligned versions of all WAV/AAC pairs (one in-phase, the other phase-inverted) and calculated the RMS volume of the resulting difference wave. That is, on average, how measurable the difference is between the WAV file and AAC file tested. Results below.

(Lower values indicate closer correlation between AAC and WAV files.)

In all cases, the closest correlation was between the 16-44 WAV and its corresponding AAC. This makes sense, as there is less information lost from compressing a 16-44 master to AAC than a 24-96. And in all cases, the off-diagonal files (an AAC mixed with a file other than its master) showed no closer correlation than the main-diagonal files (AAC mixed with its master), to the precision of the measuring tools.

Therefore, we can conclude that Mr. Shepherd's test was unwittingly biased toward hearing a closer match between the CD master and File B (created directly from the CD by standard iTunes) than File A (ceated by Mastered for iTunes from a different master). It is not surprising or significant that he did, in fact, prefer File B.

Nowhere in Apple's technical literature or advertising do they actually say the goal of Mastered for iTunes is to create audio files that sound 'closer to the CD.' Apple does say they set out to create a process and tools that produce audio files that are closer to the source. So we repeated our test method to compare Mastered for iTunes v. standard iTunes to see which produces files closer to a 24-96 master. Come back to see results.


            Vinyl-to-Digital Restoration #25            

Title: Ella Fitzgerald Sings the Cole Porter Songbook
Artist: Ella Fitzgerald
Genre: Jazz
Year: 1956



I didn't become aware of Ella Fitzgerald until the 70s, when her TV commercials. ("Is it live, or is it Memorex?") made her almost seem a caricature of herself. I'm very glad to have restored an original-edition copy of this LP from my father-in-law's collection to get insight into her earlier career. It reveals Ms. Fitzgerald delivering interpretations of Cole Porter songs that the composer himself must have thought true to his intent.

© 2012 Thomas G. Dennehy. All rights reserved.

Saturday, March 3, 2012

How Vinyl and iPods Ganged Up to Kill the Audio CD

NPR reported that CD sales tanked in 2010, particularly among younger buyers. The trend has continued until now and suggests that vinyl and iPods are sinking the audio CD into the so-called "fidelity belly," where mediocre products go to die.

[Image: Race to Obsolesence, David Lane.]

In his book Trade-Off, journalist Kevin Maney wote that a truly successful product provides either the richest user experience (fidelity) or the greatest convenience. Less successful products fall into what he labeled the fidelity belly, "the no-man's-land of consumer experience," characterized by commercial apathy, insufficient fidelity and insufficient convenience. (See diagram below right.)

Apple succeeds in the consumer computer market by providing the richest pre-sales experience in its retail stores. Dell and HP succeed by providing an ultra-convenient pre-sales experience online. Who is in the belly? Everyone else.

Sinking into the fidelity belly is essentially the fast track to obsolescence. Staying out of the belly is never assured, because customer expectations for fidelity and convenience constantly evolve.

While it may seem that the audio CD thrived for more than 20 years because of high fidelity, what it really offered over its fraternal twin on vinyl was convenience better robustness, more portability, multi-disc changers, in-vehicle players, random/repeat play, remote control.

In the last decade the iPod arrived to match all the conveniences of the CD, adding small (and ever smaller) player size, ubiquitous portability, invisible storage, and greater (and ever greater) capacity. Nothing can match the convenience of weightless digital audio, now available in a variety of formats at both lower and higher resolution than CD quality (choice is convenient, too).

On several online forums catering to vinyl aficianados, I posed the question, "what is it about playing an LP that appeals to you?" After all, the fundamentals of record playback haven't significantly changed in 100 years. It isn't necessarily sound quality (except among self-described audiophiles). Almost unanimously, the response came back that the real appeal of vinyl stems from interaction with an LP as a satisfying physical object large format album art, liner notes, even having to flip sides. Respondents were quite eloquent about it.

When was the last time you ever heard anyone wax rhapsodic about interacting with a CD? Has anyone ever considered a CD collectible for its nostalgia value or status as an art object? The audience for vinyl will keep it out of the belly by uniquely defining fidelity for themselves, establishing a multi-sense standard no other physical medium is likely to meet.

Thus the CD has been forced back along the convenience axis by dematerialized digital audio, forced down along the fidelity axis by vinyl, and ultimately swallowed up in the fidelity belly. It is now or will be soon become obsolete. (What to do with obsolete CDs? Here is one idea.) At least one study concluded that less than 10%  of listeners will be buying physical media in 2-4 years; that population will likely consist almost entirely of vinyl buyers, not CD buyers.

Way out in fidelity/convenience space is Maney's "fidelity mirage," a product that can deliver both super-high convenience and super-high fidelity. It is virtually impossible to do this in the commercial marketplace. Companies that attempt to reach the mirage usually fail and sink back into the belly.

But consider a high-resolution digital transfer of an LP, taken on the owner's own equipment, calibrated to his exact specifications, and restored in software to the best possible sound quality. The dematerialized result delivers super-high convenience, the original physical object retains its super-high fidelity. Is the fidelity mirage real?


            Vinyl-to-Digital Restoration #24           

Title: Social Studies
Artist: Carla Bley
Genre: Jazz
Year: 1981



Carla Bley (b. 1936) has composed and performed in a wide range of styles over her long career, including free jazz, jazz opera, political jazz with Charlie Haden's Liberation Music Orchestra, and one of most beautiful Christmas records ever. But the music that resonates most with me comes from the large ensemble with the ever-shifting lineup known as The Carla Bley Band. Social Studies is a fine example of their work. But, of all my Carla Bley LPs, I really chose to highlight this one here for its cover art still life of endangered physical media.


© 2012 Thomas G. Dennehy. All rights reserved.