POQUITIN DENSO...Audio compression



Difference engine: Music to their ears

The Economist Feb 10th 2012, 10:52 by N.V. | LOS ANGELES  http://www.economist.com/blogs/babbage/2012/02/audio-compression


EVER noticed how much louder and murkier music sounds these days? This is not entirely a matter of being out of tune with the times. Nor is it likely to be because today’s iPod generation, having suffered a decade of aural degradation, needs the volume to be cranked up. Your correspondent suspects the record companies have chosen deliberately to sacrifice some of the Compact Disc’s delicious 90 decibels of dynamic range to make their music shout louder than ever over FM radio. Record companies have long believed that making records louder gets them more “needle time”. And the more they are played on the air, the greater presumably are their sales.

The same tricks were performed back in the days of vinyl. Though an LP’s dynamic range was typically little more than half that of a CD’s and its signal-to-noise ratio nowhere near as good, audio engineers were required to compress the signal still further, so the loudness peaks in the audio stream did not bump up against the ceiling of vinyl's dynamic range. In giving the recording more “headroom”, they could then crank up the overall volume to provide the finished product with extra punch.  

In today’s digital world, the upper limit of a CD’s dynamic range occurs when the noise level of the signal hits the equivalent of “one” on the binary scale (where “zero” is silence). More than ever, it seems, audio signals being mastered for CDs are first compressed so they can then be amplified—thereby allowing the music to sound louder for more of the time. 

Modern digital compressors can prevent much of the distortion that marred analogue recordings when pushed to their limit. Some engineers argue that a CD has so much dynamic range that a portion can easily be sacrificed for compression. That may be so, but the price is invariably a duller, less airy sound. And the final result can become tedious when every beat hits the medium’s loudness ceiling.

Not that many would notice these days. The audio CD is becoming something of a relic—with sales in America now down to less than half their peak (some 943m albums, worth $13.2 billion, were sold in 2000)—as file-swapping courtesy of websites like Napster took its toll, to be followed by a proliferation of legitimate download services such as iTunes, Amazon, Walmart, Rhapsody and even the legal reincarnation of Napster. All thanks to MP3 and its ilk.
The CD lost out because the record companies were slow to embrace the social and technological changes engulfing their business. Though ideal for use at home or even in a car, the CD was simply too unwieldy to be played on the hoof. Meanwhile, MP3 provided an easy way to distribute pirate copies ripped from borrowed CDs. The audio CD had no encryption—not that copy-protection would have slowed most 14-year-olds. But the killer was that, while a CD offered enough recording room for Beethoven’s Ninth Symphony, popular music fans found it invariably had too many tracks they did not want, and were certainly not prepared to pay for. 

An MP3 file (usually a single three- to four-minute music track) is an eleventh the size of the uncompressed original on a CD. The compression-decompression algorithm (“codec”) used relies on psychoacoustical tricks to remove less audible parts of the signal—like a quieter sound masked by a louder one occurring at the same time, or notes near the limit of human hearing.

Such “lossy” codecs are widely used where the loss of some portion of the data is acceptable—as in digital television, DVDs, mobile phones, internet telephony and digital radio. The MP3 codec was the work of the Moving Picture Experts Group, an international organisation that sets standards for audio and video compression and transmission. The group published the MP3 algorithm (officially known as MPEG-1 Audio Layer III) in 1993. But the boost that made it the codec of choice was the release in 1997 of Winamp, a free software program for playing audio files.

Recall that, at the time, most people downloaded data at dial-up speeds. Using such telephone modems, downloading the uncompressed contents of a CD took the best part of a day. Swapping even a single track took over an hour. MP3 slashed the time taken to transfer tracks from hours to minutes. The trade off—a more muffled sound with limited dynamic range—was considered acceptable, given that MP3 files were listened to mostly using cheap portable players with ear-buds.
But things have changed. Three out of four American households now have broadband connections to the internet, with download speeds 20 to 50 times faster than in dial-up days. A music track that took minutes to download a decade ago can now be transferred in seconds; a whole CD in less than an hour. Meanwhile, storage space is no longer a precious commodity. A decade ago, large hard-drives could hold a few tens of gigabytes; today’s store terabytes. So, why bother compressing music files with a lossy codec like MP3?

The short answer is that most of the online services for downloading or streaming music have adopted better ones. One such codec is the AAC (Advanced Audio Coding) algorithm used by Apple’s iTunes and others. Another is the Ogg Vorbis codec, an open-source project supported by the Xiph.Org Foundation.

The longer answer is that the fidelity of an audio file rests on at least three things, each of which can be tweaked to improve sound quality. One is the bit-rate (ie, the amount of data per second) at which the recording is encoded and played back. (The uncompressed audio stored on a CD is encoded at 1,411.2 kilobits per second.) Too low a bit-rate used for compression and artifacts not present in the original recording can become audible in the reproduction. In general, the higher the bit-rate, the larger the compressed file, but the closer it will sound to the original.

Another factor influencing the quality of digital sound is the sampling rate—ie, the number of times per second a sound wave is sampled to create a digital approximation of its analogue profile. The standard CD uses a sampling rate of 44.1 kilohertz. Attempts to sample the sound at higher rates, such as 96 kilohertz or even 192 kilohertz, have failed to catch on.

Probably for good reason. According to the Nyquist-Shannon theory (a cornerstone of communications science), a sampling frequency of twice the maximum frequency in an audio stream is usually enough to reproduce the signal faithfully. As the highest frequency the human ear can resolve is around 20 kilohertz, the CD’s sample rate of 44.1 kilohertz is deemed more than enough.

The third factor affecting the quality of the sound is the compression ratio, which depends on the bit-rate used for the original encoding and the bit-rate chosen to do the squeezing. Thus an MP3 file—ripped from a CD at the standard 128 kilobits per second—has a compression ratio of roughly 11-to-one (ie, 1,411.2 divided by 128). When a bit-rate of 320 kilobits per second is used, the compression ratio becomes little more than four-to-one. In short, the compressed file is bigger but sounds better.

As the bandwidth available for downloading audio files from the internet has increased and hard-drives have become larger, files compressed at 320 kilobits per second (and even 640 kilobits per second) are becoming common. But even that is not enough to satisfy many musicians. Some go as far as to claim the CD has run its course, and have started releasing their music on DVDs and even Blu-ray Discs. All agree, though, that lossy algorithms of the past need to be replaced by lossless ones.

Compression algorithms such as the Free Lossless Audio Codec (FLAC) from the Xiph.Org Foundation and Windows Media Audio Lossless from Microsoft can scrunch an audio file to about half its original CD size. But unlike lossy codecs, lossless ones reconstruct the original audio stream as an exact duplicate without any loss of data. That makes them ideal for creating archives, editing audio files and producing master copies for mass production, as well as for high-fidelity playback.

Rock-and-roll, as usual, is leading the way. Bands such as Pearl Jam and Metallica have used FLAC to sell recordings of their concerts online. The rocker John Mellencamp issued a CD in 2008, which came with a lossless high-definition version on a DVD to demonstrate what the music should really sound like. In 2009, the Canadian singer/songwriter Neil Young ("the Godfather of Grunge") released the first of what is to be a ten-volume set of archives on Blu-ray Disc as well as CD and DVD. With its lossless codecs, Blu-ray can play high-resolution music way beyond a CD’s dynamic range.

Whether the listening public can actually hear the subtleties being conveyed is another matter. The perceived quality of a recording depends on what the listener’s ears have been trained on (as well as the quality of the audio equipment and the ambient noise). Jonathan Berger, a professor of music at Stanford University in California, gets his incoming students every year to listen to a variety of recordings compressed with different algorithms. Each year, their preference for music in MP3 format increases.

Clearly, the iPod generation is becoming attuned to the “sizzle” caused by a muffled base and clipped high notes that MP3’s lossy codec imparts. Their preference is similar to the way audiophiles from a previous generation swore that vinyl LPs produced a warmer, richer sound than CDs. To their ears, they did.

In reality, they had simply become so attuned to the clicks and crackles, as well as the limited dynamic range, of the older format that the familiarity made them feel comfortable. A future generation—trained to hear a recording’s subtleties burned by a lossless codec onto an audio Blu-ray Disc—will be puzzled by their parents’ preoccupation with sizzling songs rather than an authentic replica of the music the performer actually created.

No hay comentarios:

Publicar un comentario

COMENTE SIN RESTRICCIONES PERO ATÉNGASE A SUS CONSECUENCIAS