MP3 Compression or Bad Mastering?

When I heard Jay-Z and Kanye’s “Murder to Excellence” on the radio and internet, the song sounded muffled.  The cymbals aren’t crisp.  The entire song, including the vocals, sounds like it’s coming out of bad speakers.  I figured maybe the spectral range of the song was too broad for mp3 compression and it was losing the high frequency detail.  I wanted to hear the real thing, so I bought the CD to get a good copy of the song.  Here’s what I got.  It’s the WAV file of Murder to Excellence from the Watch the Throne CD.

poorly mastered song

Murder to Excellence WAV file

Continue reading

Dropbox Hashing

If you add a file to your Dropbox folder that already exists on Dropbox’s servers, you don’t have to send the file.  They just mark the existing file as also being owned by you.  In fact, Dropbox works on files in 4 MB chunks, so if you modify a large file and most of it remains unchanged, they only need you to upload any 4 MB chunks that changed and don’t already exist somewhere else on Dropbox.  A lot of people are amazed or confused by this technology.  How can Dropbox’s server and your computer know that two 4 MB chunks are the same without comparing them side-by-side? Continue reading

Dropbox International Performance

I recently attended this:

Dropbox: International Performance

Come hear about several recent and future improvements to Dropbox’s international performance. Dropbox Engineer, Nipunn Koorapati, will talk about the Dropbox server architecture as well as recent optimizations to the client-server protocol for small and large files focused on our high latency international users.

We face international performance challenges at Offroad too, with systems in Switzerland and the US.  We have fairly high bandwidth between the sites, but the high round-trip times (latency) leads to problems. Continue reading

Buy Computers This Year

This year’s CES offers some exciting developments in computing.  But first, isn’t it odd that all these products are released just after Christmas?  Maybe it’s because Christmas is more about stores clearing shelves of unsold inventory at the end of the year.  Obligatory gifting customs lead people to buy discounted junk for others.  Stuff that they wouldn’t otherwise want for themselves.

I’ve held off new computer purchases for a long time, waiting for the 14nm chips from Intel.  They’re over a year late, which is understandable considering how amazing they are.  One can only imagine the internal dynamics at Intel, where the management and marketing team want to adhere to a long-term schedule of improvements while the scientists and engineers can only guess how long it will take to develop cutting-edge technology.

Here are the reasons I think 2015 is a good year to upgrade computers:

  • 14nm chips offer reduced power consumption, which means longer battery life, less heat, quieter fans or no fans.  It seems like it’s just another size in a long progression, …45, 32, 22, 14. But this time the performance change will feel like a breath of fresh air, the same way that 64-bit chips alleviated maximum RAM issues or SSD’s solved storage seek times.  And note that a 15W quad-core chip compared to a 45W dual-core chip is going to use even less than 1/3 the power to run a single thread because the power rating is for all the cores.
  • Screens are finally being marketed in terms of resolution.  I even saw a laptop screen quoted in megapixels.  I’ve always said monitors should be evaluated on megapixels and camera sensors on size.  Maybe we just had to max out practical screen sizes and camera sensor resolutions before shifting attention to the other factor.
  • vPro will make remote management of computers much easier.  With it, I can reinstall an OS at the office from across the ocean.
  • The AES-NI (Advanced Encryption Standard New Instructions) should reduce processor workload.  Even if you don’t encrypt all your data, you probably use https, VPN’s, WPA, or something else that uses AES encryption.
  • The Intel Compute Stick is fun.  Imagine the possibilities offered by a computer so small, low powered and inexpensive.  You could have a solar powered computer on your roof.  A computer in your car.  A computer attached to each TV (for people who still use TV’s!).  Sure, all that was possible before with the Raspberry Pi or by turning a smartphone into a PC, but that required effort.

Last year, a new laptop made little sense when compared to a 4 year old laptop.  With similar weight and processor performance, you would get a worse screen, better battery life, and better video performance.  It made more sense to buy a used laptop, throw in an SSD and clean the dust off its heat sinks.  I’m using a 6 year old Precision M6400 and my only complaints are weight and fan noise under heavy load.

I’m recommending the new Intel NUCs with Broadwell chips and the Dell XPS 13.  Personally, I’m going to hold off on a laptop upgrade until the 14nm chips make it into a Precision mobile workstation since I want two hard drives, more built-in ports, and a 15″ or 17″ screen (yeah, screen size also matters a bit).

Distortion in Digital Audio

Here’s a good article on digital audio.

The article explains a lot of things people who like music should know. First, we’ve all seen the “THD” or “total harmonic distortion” specs on all audio equipment. It turns out that harmonic distortion isn’t really an issue and it might even make music sound better. Violins have so many harmonics already, a little harmonic distortion is no big deal. Also, it’s a poor metric because digital devices are more prone to other types of distortion. It’s no surprise that they achieve <0.01% THD or something small like that, without much expense. It reminds me of $50 digital cameras with 14 MP that take awful pictures. Anyway, don’t buy audio gear based on the THD numbers. Now I wonder if maybe the expensive tube amps with poor THD numbers actually do sound better because they avoid the truly bad types of distortion that digital systems can create.

The article also does a great job of explaining quantization distortion and how dither turns it into quantization noise. Also, read about dither or at least look at the pictures so you’re clear on exactly how dither works and how amazing an idea it is:

The article goes on to discuss 1-bit DSD, which I spoke highly of from a technical standpoint in this previous post. However, I agree with the authors that 24-bit or higher PCM is the best choice for audio processing and 1-bit DSD only makes sense as a final distribution medium. Any mathematical operations on 1-bit DSD are very complex and I don’t really know how the distortion and noise introduced will sound, but PCM is easy to understand.

I recently bought a couple pairs of high-end headphones. As the audio forums suggested, the headphones didn’t sound very good plugged into my computer’s soundcard. My ears felt fatigued after listening, despite low volumes. People on the forums say the poor quality is because sound cards or most digital players don’t have the power to drive large headphones. But they sounded bad even with the volume turned way down. Now, I think it’s more of an issue of quantization noise at low volumes. A D/A converter should receive the raw original bitstream, not scaled down, and then the volume adjustment should be an analog operation. I got a fairly inexpensive HeadRoom BitHead portable headphone amplifier / USB soundcard which makes the headphones sound great!

Also, the more I’ve learned and listened, the more I think that mp3 audio may in fact be of sufficient quality or even indistinguishable from CD, SACD or DVD-Audio. The inadequate sounding mp3′s I’ve heard are probably that way because the original recording or mastering was poor, not a fault of the compression. It is possible to get a crisp, clear, precise sound from an mp3. A bad D/A conversion system probably does more audible harm than the mp3 compression.

ADC Designs Including Delta-Sigma

I recently interviewed a candidate who listed having worked in an ADC group at Analog Devices.  Wanting to ask a technical question on a topic he would/should know, I noticed that I wasn’t sure exactly how an ADC works.  So, I thought up three solutions before asking the question, but still wondered how ADC’s work fast enough for applications like audio.  I’m familiar with the ramp and counter method used in microcontrollers from having used them.  The successive approximation method is also a straightforward and fairly good solution, but even that takes 24 cycles for audio quality ADC.  Next, I reinvented multistage subranging ADC as a way to expand flash ADC.  While trying to figure out what my invention was called, I stumbled across another really cool ADC that I would never have thought of.  The operation of most ADC’s can be explained to anyone because they don’t require special knowledge to understand, but delta-sigma ADC’s are completely based on frequency-domain thinking.  Learning about them helped improve my understanding of DSP and control theory.

Here’s a good discussion of various ADC’s:

Read all 3 parts of this post.  Part 1 helps understand what the modulator does.  Part 2 makes Nyquist simpler than ever before.  Part 3 gives insight into how the noise shaping really works.

I like this one because it explains how you extract 16 bits of width out of just 64 samples.

And once you understand all that, you’ll appreciate this piece on upsampling in CD players
but don’t buy one because it’s all overpriced.  Advertising the $1.25 DAC in a CD player as “Burr Brown” brand is like restaurants labeling their bacon “applewood smoked”.