Some fundamentals about soundMusic is a wave. Like ocean-waves, but through air. That's what we hear.
The fundamental C note is a sine wave at 440Hz (differential pressure of air as the y axis, time as the x axis).
Music is however more complex than just a single wave. You have a complex construction of many many different types of waves. The beauty is you can work backwards from the very complex wave-pattern back down to its constituents, i.e. breaking down a complex violin sound into basic sine waves.
The bass region is typically with frequency range of 50~300Hz. The typical drum is about ~125Hz, while electronic music can give very deep bass to ~50Hz.
The highest musical note on a full 88-key keyboard does not exceed 5000Hz. The highest Soprano singer cannot sing higher than ~1000Hz.
The musical range is thus about 50~5000Hz, the normal hearing range is about 30~20000Hz.
Also, since we're talking about digital music, 1bit is one binary digit (i.e. 1 or 0). 1 byte is 8 bits (i.e. 10110110 is one byte. there are 256 different combinations within 1 byte.) We use B for bytes, and b for bits. So 1 kB contains 1024*8=8192b=8kb.
Lossless vs lossy formatsPerhaps the most obvious difference between lossless vs lossy formats are frequency cut-offs.
Typical CD audio records to a maximum of 22050Hz. Due to the various ways it stores that data, 1 second of CD music is approximately 176kB. So a 4-minute track is about 40 MB. The bitrate of a CD is ~1.4Mb/s. The WAV format is almost the same as the CD format, same bitrates and so forth.
FLAC, AIFF and other lossless formats are lossless compression of the CD format. These do not lose any information, but compresses the filesize using clever algorithms. The concept is almost the same as the concept of .zip and so on. You retain all the digital information, but reduce the space required. You get the same bit-perfect reproduction of CD audio.
MP3, AAC and other lossy formats use more aggressive compression algorithms. Typically, it is harder to store information about high frequencies. MP3 throws away some of the higher frequencies, and is thus able to compress the audio to a much smaller size.
You do actually lose some audio information, which is undesirable. Higher quality compressions (e.g. 320kbps) throws away less information, lower quality compressions (e.g. 128kbps) throws away more information.
Here's a rough guide to how much data is thrown away (remembering that lossless audio has a max frequency of ~22kHz):
15kHz cutoff: 128kbps mp3
16kHz cutoff: 192kbps mp3
18kHz cutoff: 256kbps mp3
20~21kHz cutoff: 320kbps mp3 (4min~10MB)
No cutoff: FLAC. (4min~30MB)
The killer question is, is this significant? I direct you to
this listening test of 320kbps vs 128kbps.
You'll find that the differences are very small, you wouldn't even notice it unless you know what you were looking for. And you need damn good headphones to spot the differences.
So now that we've established the frequency region between 15kHz and 20kHz is miniscule, we shall jump to the mp3 vs FLAC argument. Is that 20~22kHz region audible? Does it justify the file-size increase? In my opinion, you do not collect FLAC music for listening purposes. You collect FLAC because you have OCD and you want to *know* that all the audio is there, even though the differences cannot really be appreciated. I have a large FLAC collection, as well as a large 320 collection. I do not think one is better than the other for listening to music.
If we can barely hear the differences between FLAC vs MP3, can we hear the difference between 320 AAC and 320 MP3? The answer is no. Typically, encoder comparisons are performed at very low bitrate (less than 96kbps). At these settings, we can start hearing faults of the compression method (aka encoder artefacts). At anything beyond ~192kbps, you would not notice the difference.
So which music format is the best? If you want to collect bit-perfect music, go FLAC. If you want to just listen to music, anything above 128kbps MP3 will be fine.
Do ears and speakers contribute?Part of the reason you can barely tell the difference between different quality MP3 music is that the human hearing tapers off at the lower and higher frequency. The human hearing does not have a flat frequency response. We are much more sensitive to lower frequency (around 1kHz) than higher frequency (e.g. 10kHz). Our sensitive hearing range is about 500Hz->5kHz. The same power at 10kHz is about 8~16 times quieter than 1kHz. This is why we barely tell the difference between various compression settings, because the difference in sound is under-exaggerated by our ears. This is also why subwoofers need to be very powerful, not only because the frequency is low, but it also need to produce sound at a 20x the level of the mids.
Read more about human hearing here.Because of this, speaker manufacturers tend to ignore the ultra-high and ultra-low frequencies. On cheap headphones/speakers, these sound simply don't get reproduced. It's not until you start spending a lot of money (more than a few hundred dollars), then the differences become more noticeable. This is why some home-theatre 5.1 setups cost tens of thousands, but others cost $200. It's got a lot to do with the frequency-response.
For the average consumer's gear, any MP3 above 196kbps wil be more than enough. I have personally spent over $2k on audio-related equipment, and I can just notice a slight difference between 256 vs 320.
What do audiophiles do?Audiophiles buy their music, that's the only way to ensure your music has guaranteed quality.
The audiophile-favourite setting for MP3 is called the V0 setting. It is the highest-quality setting of VBR (variable bitrate), and it is an option you can select on your CD-ripping software. The file-size is a bit smaller than MP3 320, but the quality is almost exactly the same. It is ideal for portable players.
When asked about what makes music sound good, the typical audiophile will give this breakdown out of 100:
-Headphones (15)
-Amplifiers (5)
-Source (sound-card, etc) (5)
-Format (5)
-Audio engineer's mastering (70)
Later today, I will post more on how sound goes from singing to a CD. That process is very complex, and have room for many many mistakes. The competence of the audio engineer is vital in producing good sounding music. Linkin Park failed at that once, and every track on one of their CDs is clipped. Unfortunately, the consumers have no control over this.
Summing upSo, for the average person listening to music on your iPod:
-if you don't do your own ripping, just remember that your ears can't really tell the difference
-if you do your own ripping, just remember if it sounds bad, it most probably isn't your fault. Chances are it's your speakers, or the audio engineer who had a few too many to drink.
-your choice of format won't really affect the audio quality. Go for the one that will be the most convenient.
Long post is long. Merry Christmas.

(coming up: PCM, ADC and DAC. The inherent problem with digital audio.)