Posts

How It Works: Audio Compression

The term “compression” is often a source of confusion when discussing digital music. There are two kinds of compression. The first is the kind used to compress the size of files; this is data compression. There is lossy compression, using with MP3 and AAC files, and lossless compression, used with FLAC and Apple Lossless formats.

But the other kind of compression, dynamic range compression, is the much derided method of limiting the amount of dynamic range in music. The point of dynamic range compression is to make less of a difference between the quietest parts of a piece of music and the loudest parts. Most music is compressed as part of the recording and mastering process, because it does sound a lot better, and keeps you from blowing out your speakers. But over-compressing music makes it sound like crap.

The best way to understand dynamic compression is to look at a couple of audio waveforms. The screenshots below were made using Rogue Amoeba’s Fission audio editor.

Here’s a song which is free on iTunes today. I chose this one because, well, any free pop single is likely to be heavily compressed, and this example shows that I’m not wrong.

001.png

You can see two things in this waveform. The first is that the song is almost universally loud; the waves show the loudness. The second thing to notice is that there is a lot of clipping; audio volume that hits the top of the available limit. This is bad. As Wikipedia says:

Music which is clipped experiences amplitude compression, whereby all notes begin to sound equally loud because loud notes are being clipped to the same output level as softer notes.

Excessive compression has led to what is known as the loudness wars. This is when record producers make their songs louder and louder so they stand out against other songs. Generally, the human brain perceives louder music to be better, so additional loudness can make a song more compelling. But, in the end, all this has done is made lots of loud, clipped songs.

Here’s an example of a song which is not compressed. This is Pink Floyd’s Wish You Were Here:

002.png

You can see the difference in two places in this screenshot. In the overall timeline at the top of the window, you can see that the music has a shape; in the first screenshot of the free pop single, it’s just one long mass of sound. And in the actual waveform, you can see that there is modulation, and no clipping, in the Pink Floyd song.

The difference is that you may play your Pink Floyd song at a louder volume, in order to hear the quiet parts of the song, but the louder parts will be, well, loud. In the first song, the entire song is loud, and you’re likely to become fatigued more quickly after listening to music like that.

For good examples of audio that is not compressed – or only very slightly – watch a movie. In general, movie audio is not compressed; this is why the dialog is often too soft, but the special effects are too loud. This is why you often need to adjust the volume for movies with lots of explosions, otherwise your ears hurt. (You may have an AV receiver which has a dynamic range compression feature; if you’ve turned this on, you may not hear such large differences in volume.)

Dynamic range compression isn’t a bad thing; it’s just bad when it’s overdone, as is the case in much popular music today.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone

Here’s How Apple Could Make Music Streaming Work

The word is out that iTunes Radio isn’t performing as Apple had hoped. Album sales are down, streaming revenue is up. iTunes Radio may not be the appropriate model for Apple to use to compensate for a drop in music sales in the iTunes Store. It is said that Apple is in talks with record labels to set up a music streaming service. This wouldn’t be like iTunes Radio, but an on-demand streaming service, like Spotify and others.

I looked at the math in Is Streaming the Future of Music?, but now I want to look at how I think Apple could make a streaming service work. My main points here show why I don’t like current streaming services; obviously, other listeners have other ways of listening, so their ideas may be different. Feel free to post comments about changes you would make to have a streaming service that works for you.

To start with, the main problem with many streaming services is that they are designed for people who listen to songs. A listener wants to hear the latest song by their favorite artist, and they search for it, then listen to it. It’s unlikely that they want to hear an entire album, but they might want to listen to a few tracks of the latest album. They’ll choose them one at a time, or make a playlist with them.

But some listeners are more album-oriented. You can do this with streaming services, but it’s not as simple. With Spotify, on the Desktop, it’s simple to listen to an album, but in their iOS app, it’s not the same. There’s actually no button that lets you play an album. You can listen to an album in shuffle mode; there’s a great big button for that. You can add the album to a playlist; tap the … button at the top right, then tap Add to Playlist. Or you can tap on a track, and add it to a playlist.


2014 03 25 10 16 51       2014 03 25 10 16 59

My guess is that the occasional listeners – the ones who want to listen to songs – will continue with ad-supported streaming services, but album listeners, or those with broad, eclectic tastes – the ones who keep the music industry afloat – would be willing to pay, if these services welcomed them.

Here’s what I think needs to be done:

  • It should be easy to find music, by artist name, song name, album name, etc. This currently isn’t the case with Spotify; they’re search isn’t very good (I’m not familiar enough with other streaming services, because there aren’t many available in the UK). iTunes searches are good enough: you can search by album, artist, song, etc., and, in general, you find what you want, even if it’s somewhat obscure.
  • You should be able to play an entire album with a single click or tap.
  • You should be able to access a full history of what you have listened to. Spotify has a Play Queue – a sort of “Up Next” – and there’s a History tab, which should show everything I’ve listened to. I haven’t used Spotify in a while, and the History tab only contains what I’ve listened to on my computer. If I look on my other Mac, nothing shows up; nothing is listed from what I’ve listened to on mobile devices. This Recently Played playlist should contain everything I’ve listened to with my account, from every device, and should be available on every device as well.
  • You should be able to rate music, not just “star” it, using a five-point scale, as you can do in your iTunes library. You should be able to record what you like and what you don’t, because if you listen to a lot of music, it’s hard to remember.
  • If iTunes becomes a streaming service, you should be able to stream any music from the iTunes Store (as long as labels have opted in). It should be transparent as to what you can and can’t stream, and streaming should be as easy as buying.
  • You should be able to add streaming tracks to your iTunes library. This is the killer feature. Just as you can have tracks “in the cloud” in your iTunes library, and use them as part of a playlist, you should be able to do the same with streaming tracks. They should become part of your library, combined with your purchased music, and you should be able to play them as if they were in your library.
  • iTunes should cache what you listen to, so it doesn’t have to keep re-downloading the same tracks; so, rather than streaming each time, it would store tracks – in encrypted form – in a cache.
  • You should be able to sync streaming tracks to your iOS device, either via iTunes Match or by a connected sync. In other words, the difference between what you physically own and what you stream should disappear. iTunes should be able to sync cached files or download streaming tracks for offline playing, so you can sync them to an iPhone and listen to them without worrying about paying for mobile data. (You should have the choice as to whether you want to sync actual tracks or just pointers, to later grab them on your iOS device.)

What I’m suggesting, in essence, is that the wall between your music library and the entire iTunes Store library be torn down, for a fee. Apple is the only company that can do this, because of the integration of the iTunes Store and the iTunes app, and its ability to sync content to mobile devices. If Apple were to do this, they would have literally no competitors, at least on iOS devices.

However, if this is the case, who would buy music? I would still buy some CDs, because I want to own music, but I can’t imagine that I’d buy any more digital music. This is the problem with streaming services: if they’re too good, they will cannibalize sales. However, streaming done right could cannibalize piracy as well.

And there, as they say, is the rub. If you make streaming too good, no one will buy music any more. If streaming is mediocre, not enough people will pay for it. If streaming is going to generate enough income to keep musicians and record labels afloat, maybe it’s time to make a big leap into the unknown. Right now, only Apple can do this.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone

Did You Know that Spotify Uses Peer-to-Peer Networking?

Most people don’t know this, but Spotify uses peer-to-peer networking for its streaming. In other words, when you choose to stream a specific song or album from Spotify, you may get your stream from Spotify itself, or you may get it from other users.

The problem with this is that peer-to-peer networking may affect your internet plan. While many users have unlimited downloads and uploads, this isn’t the case for everyone. If you use Spotify’s desktop client, you’ll not only be downloading music, but you’ll also be uploading, if the music you’ve listened to is popular enough.

Spotify doesn’t seem to have a page explaining this, but here’s a forum thread where a moderator discusses the use of peer-to-peer. Note that mobile apps and the web player don’t use peer-to-peer networking, so if you are on a restricted data plan for your computer, you might want to use either of those.

Also, if you reduce the size of the cache Spotify stores on your computer (Spotify > Preferences), there will be less music available to stream.

010.png

So be aware that, if you leave Spotify running, you may be using up a lot of your quota, uploading music to others. Reduce the cache, and quit Spotify when you’re not using it. Or, just use the web player.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone

How Apple’s AirPlay Streams Audio

I got a question from a reader asking how Apple’s AirPlay streams audio. The question specifically asked about how audio files are converted, and whether AirPlay reduces their quality.

Apple doesn’t provide much information about AirPlay, and I found a number of articles and forum posts where people described complex testing routines to determine the bit depth and sample rate of music streamed to AirPlay devices, such as an Apple TV or AirPort Express. But you don’t need to go to such great lengths to figure this out. Simply open Audio-MIDI Setup on a Mac, and select AirPlay.

009.png

As you can see above, AirPlay streams at 16-bit, 44,100 kHz. However, what you don’t see is that AirPlay streams music in Apple Lossless format. What this means is that no matter what format your music is in, it gets converted by OS X – not by iTunes – to Apple Lossless, to ensure the highest quality. So lossless files will be streamed as lossless, as will AAC or MP3 files.

However, high-resolution files will be downsampled to 16/44.1. Interestingly, the Apple TV outputs audio in 48 kHZ, most likely because this is 48 kHz is the standard for movie and TV audio[1]. Movies sold by the iTunes Store contain audio at 48 kHz, but only at 160 kbps.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone

How Hi-Fi Magazines Write about Cables, Part 6

In this episode, we discover that What Hi-Fi? actually likes MP3 files. In an article about the new Sony Music Unlimited, they use adjectives generally only applied to expensive cables.

And then comes the major problem with the quality on offer. On the one hand, its 320kbps high-quality streams are among our favourite sounding on test, with impressive detail levels, precise note formation and a warm and exciting character.

Reading the above, it sounds like Sony’s MP3s are somehow better than others. “Precise note formation…?” Give me a break.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone

CD and DVD Copying to Be Legal in the UK on June 1; Finally

As crazy as it sounds, it’s been illegal in the UK to rip CDs and DVDs. New copyright regulations which take effect on June 1, now make this legal:

Personal copies for private use

3. (1) After section 28A(4) insert——

“28B Personal copies for private use

(1) The making of a copy of a work, other than a computer program, by an individual does not infringe copyright in the work provided that the copy—

(a)is a copy of—
(i)the individual’s own copy of the work, or
(ii)a personal copy of the work made by the individual,
(b)is made for the individual’s private use, and
(c)is made for ends which are neither directly nor indirectly commercial.

[...]

(5) In subsection (1)(b) “private use” includes private use facilitated by the making of a copy—

(a)as a back up copy,
(b)for the purposes of format-shifting, or
(c)for the purposes of storage, including in an electronic storage area accessed by means of the internet or similar means which is accessible only by the individual (and the person responsible for the storage area).

Finally. I won’t be breaking the law when I rip my CDs and DVDs.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone

Which Hard Disk Makes High-Resolution Music Sound Best, or What Makes Audiophiles Tick?

Following up on yesterday’s article about expensive Ethernet cables used in audiophile audio systems, and related to a recent article about why high-resolution music is a marketing ploy, I toss out a question for audiophiles. If things such as cables make a difference, what about hard disks? Has anyone done testing on hard disks, to see which makes music sound better? Do SSDs sound better than spinning-platter hard disks?

What about system busses? They must have an effect too. They could introduce jitter, even when playing music on a computer. And RAM? Is there any audiophile-grade RAM to ensure the proper “tonal neutrality” and “strong dynamics” of the music you listen to?

The ridiculous claims made by audiophiles do more harm than good to the audio industry in general. They allow companies to produce hugely overpriced equipment, and sell it to credulous people, but they also influence the entire audio equipment market, making us low-end people think that we don’t know how to listen to music, with a fair amount of contempt at times.

Yes, there are audio elements that make a difference. No one can deny that speakers and headphones sound very different[1]; that’s no surprise, because they actually create sound (i.e., they convert electrical signals into air waves, which we, in turn, perceive as sound). DACs can make a difference: the cheap DAC in a $30 CD player will be bested by a standalone DAC, or one in a more expensive player, because they are responsible for converting digital signals to sound signals. And there are certainly valid reasons, other than sound, for purchasing a more expensive amplifier: it may have more features, more inputs and outputs, or may be esthetically pleasing.

But what about all the other elements of an audio system? There sure are lots of them, and, according to audiophiles, altering any of them should have an effect on sound.

Assuming that you listen to music on a computer – which is the most complex audio chain – here are the elements that come into play:

  • Power supply
  • Power cable
  • Computer (I won’t isolate all the elements inside a computer that should influence sound, if audiophile theories are accepted)
  • Sound card (if using an analog output)
  • Digital interconnect: USB / Toslink / Ethernet cable (if using a digital output)
  • DAC (digital-analog converter, if used)
  • Audio interconnects: cables from DAC to pre-amplifier to amplifier, or from computer to pre-amplifier or amplifier
  • Pre-amplifier (if used)
  • Amplifier
  • Speaker cables
  • Speakers
  • Headphone amplifier (if used)
  • Headphones (if used)
  • Listening environment (which has much more effect on sound than most people realize)

According to audiophiles, changing any one of those items should affect the resulting sound. And they claim to be able to hear the difference between, say, a power cable or an audio interconnect among that complex chain.

There are two ways of testing such things. One is a purely subjective test; you hook up a new item and decide whether it sounds better. This is clearly influenced by many factors, notably differences in volume, or simply a desire to reinforce beliefs that a new cable, for example, really does sound better. The second method is ABX testing, where listeners hear different items, but don’t know what they’re listening to. While the former method is almost entirely subjective, the latter is fairly objective. Dozens of ABX tests have shown that people simply can’t hear the difference between different components, showing that, in most cases, the difference in price does not translate to a difference in quality. There have been tests that show that coat hangers sound as good as expensive speaker cables, and that all amplifiers sound the same.

So when these ABX tests show such results, and challenge audiophiles and their expenditures, they come up with another explanation: that the concept of ABX tests is flawed. “The answer is that blind listening tests fundamentally distort the listening process and are worthless in determining the audibility of a certain phenomenon.” They have to defend their choices to spend a lot of money on audio equipment.

You would think that, if all these elements made such a difference, recording engineers would use them to ensure the best possible capture of music. But this isn’t the case. As I recently wrote, I found it interesting, when attending a classical recording session in a church, that no expensive cabling was used, just “miles of copper.”

I care about music; a lot. I care about sound; only if it is in service to the music. I don’t have cheap audio equipment, but my setups are around the high end of consumer audio pricing. Because that’s what it’s worth paying; when you pay more, the quality differences become miniscule. I have a full stereo in my office, with good speakers, and I use several different headphones. But it’s a shame to keep reading reviews of things like cables that are simply made up. If all these elements made a difference in sound, then it would be easy to tell them apart. The fact that one can’t tell the difference in blind testing shows that this is an industry built on feet of clay.


  1. Several months ago, I went to a hi-fi store to listen to a number of headphones. I listened to several Grado headphones, and there was a clear difference in clarity across different models; the more expensive ones sounded better. But that doesn’t mean that any headphones at the same price would sound good. I also tried out Bower & Wilkins’ P5 portable headphones, which were nearly as expensive as the best Grados I tested. I disliked their sound very much; it was too bassy for me. So there’s a lot of personal taste that goes into things like speakers and headphones; it may not be the most expensive that sound “best.”  ↩

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone

Is Streaming the Future of Music?

It’s becoming clear that the future of the music industry depends, in part, on streaming. Music streaming now represents $1 billion worldwide, and is growing steadily. However, this only represents 28 million paid subscribers; most of the money is coming from ads, and none of these music streaming services is profitable. Streaming represents only 6.7% of the total recorded music market, but is growing, just as the overall marked is decreasing, to around $15 billion.

The music industry is still reeling from the drop in its sales. It’s hard to remember, but there was a golden period for records, with a peak of $40 billion in 1999. Then along came the internet. (Though the internet is not the only cause of the drop; lower prices have a huge effect on the bottom line.)

Forbes has an interesting article on the math of the music industry. The $40 was spent by roughly 600 million people who each spent $64 a year. (This doesn’t include those who bought one or two CDs a year.) Currently, iTunes users spend, on average, $48 a year, or 25% less; adjust that for inflation, and the current expenditure is roughly half what it was in 1999 (a rough calculation suggests that the $64 in 1999 is worth about $90 today).

But today’s streaming services generally charge a round $10 a month (or €10, or £10), which is a lot more than what music fans were spending in 1999. Personally, at those prices, I prefer buying CDs and not spending the £120 a year it would cost for a streaming service. I get to own the music, contribute to artists, and manage my music collection.

The Forbes article discusses a talk at this year’s Midem conference (a music industry conference held in France), where Marc Geiger, the global head of music for William Morris Endeavor, discussed how streaming services could help the recording industry print money. He imagined the following situation:

Geiger envisioned a future in which 1 billion people pay $15 per month for streaming subscription, yielding a whopping $180 billion in revenues for the music industry. (About 25-30% would go to distributors like Spotify, but even at the $135 billion figure Geiger used, streaming alone would be more than 4x larger than the entire industry was for the labels back in 1999.) On top of that, he thinks that ad-based services like YouTube will generate another $50 billion, of which the labels will get 50%.

But, as the Forbes article says, $10 a month is simply too much. If the average iTunes user spends $48, maybe that’s the price point to aim for. It’s true that $4 a month is a pittance, but is it fair to charge “a pittance” for music? Does that devalue music overall? iTunes Radio only costs $25 a year (as part of the broader iTunes Match), but that’s not an on-demand streaming service.

Right now, not enough listeners see any need to pay for streaming; this won’t change with current streaming services. As long as people are willing to put up with ads, they’ll keep listening to free streaming, or just listen to music from other sources. But if streaming were done right, perhaps more people would make the shift. And I think Apple can do streaming the right way. Read Here’s How an Apple Music Streaming Service Should Work to find out how.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone