HydrogenAudio

Hydrogenaudio Forum => General Audio => Topic started by: plazz on 2002-07-10 18:48:54

Title: Is compression used in CDs?
Post by: plazz on 2002-07-10 18:48:54
Is any kind of compression at all used in audio CD's? I know that there is on DVD's, just at a huge bitrate.
Title: Is compression used in CDs?
Post by: rjamorim on 2002-07-10 18:50:49
Quote
Originally posted by plazz
Is any kind of compression at all used in audio CD's? I know that there is on DVD's, just at a huge bitrate.


Nope. Plain old RAW PCM.
Title: Is compression used in CDs?
Post by: Speek on 2002-07-10 19:47:54
Yes, there are only 44100 samples per second (per channel) on a CD. Uncompressed music has an unlimited amount of samples. But this is a somewhat unusual view
Title: Is compression used in CDs?
Post by: bryant on 2002-07-10 20:05:18
Quote
Originally posted by Speek
Yes, there are only 44100 samples per second (per channel) on a CD. Uncompressed music has an unlimited amount of samples. But this is a somewhat unusual view
Very true, Speek!

And the data is also truncated to 16 bits, which is yet another form of compression. No wonder CDs sound so bad! :mad:

But, by convention, linear PCM at any bit depth or sample rate is considered "uncompressed".
Title: Is compression used in CDs?
Post by: rjamorim on 2002-07-10 20:09:42
Quote
Originally posted by bryant
No wonder CDs sound so bad! :mad:


WHA?

Are you meaning my beloved Floyd CDs sound bad?

Be prepared, I'll start saying bad things about your cat.
Title: Is compression used in CDs?
Post by: fewtch on 2002-07-10 20:22:50
Quote
Originally posted by rjamorim


WHA?

Are you meaning my beloved Floyd CDs sound bad?

Be prepared, I'll start saying bad things about your cat.

That could start a flame war to end all the others!
Title: Is compression used in CDs?
Post by: The Belgain on 2002-07-10 20:27:45
Can anyone tell the difference between 16bit 44.1 kHz music and stuff sampled at a higher frequency or bitdepth (such as DVD-Audio, SACD, etc...)?

Was 44.1 kHz chosen randomly as a result of the amount of data that could be put on a CD and the play length they were looking for or is it chosen to bear some kind of relation to the upper frequency limit of human hearing?
Title: Is compression used in CDs?
Post by: rjamorim on 2002-07-10 20:41:51
Quote
Originally posted by The Belgain
Can anyone tell the difference between 16bit 44.1 kHz music and stuff sampled at a higher frequency or bitdepth (such as DVD-Audio, SACD, etc...)?

Was 44.1 kHz chosen randomly as a result of the amount of data that could be put on a CD and the play length they were looking for or is it chosen to bear some kind of relation to the upper frequency limit of human hearing?


I would believe that, when Sony and Philips engineers developed the CD standard, they looked for settings that sound good for almost everyone: 44.100Hz, 16bit, stereo.

Some people, like Filburt, and some bats might be able to hear differences. 99+% of the humanity won't.
Title: Is compression used in CDs?
Post by: Pio2001 on 2002-07-10 21:05:10
It's a bit like the sound of CDR : there is the same data in them, but some crappy CD Players can make some sound different.

Some crappy converters don't sound as good at 44.1 kHz 16 bits than at 96 kHz 24 bits, while (unless you play your records at @ 120 db) there is no more audible info in the 96 kHz 24 bits data.
Title: Is compression used in CDs?
Post by: bryant on 2002-07-10 21:29:51
Quote
Originally posted by rjamorim
Be prepared, I'll start saying bad things about your cat.
Roberto, you can say anything you like about my cat, but unless you can reliably ABX her with a reference cat then it doesn’t mean anything!
Quote
Originally posted by The Belgain
Can anyone tell the difference between 16bit 44.1 kHz music and stuff sampled at a higher frequency or bitdepth (such as DVD-Audio, SACD, etc...)?

Was 44.1 kHz chosen randomly as a result of the amount of data that could be put on a CD and the play length they were looking for or is it chosen to bear some kind of relation to the upper frequency limit of human hearing?
The 16/44 standard is basically the minimum required to provide transparent audio reproduction based on generally accepted models of human hearing. And, I believe, it has been shown that people are unable to reliably differentiate between an original analog signal and its 16/44 reproduction, just like it has been shown that they cannot hear differences between well designed amplifiers or CD players or audio cables.

But, I believe that it is more complex than that and that there may very well be advantages to higher resolution reproduction (or less “compression”). Here’s an interesting article to start with:

http://www.cco.caltech.edu/~boyk/spectra/spectra.htm (http://www.cco.caltech.edu/~boyk/spectra/spectra.htm)

BTW, much of this was discussed at length in this thread:

http://www.hydrogenaudio.org/forums/showth...=&threadid=2165 (http://www.hydrogenaudio.org/forums/showthread.php?s=&threadid=2165)
Title: Is compression used in CDs?
Post by: Frank Klemm on 2002-07-10 21:38:26
Quote
Originally posted by bryant
Very true, Speek!

And the data is also truncated to 16 bits, which is yet another form of compression. No wonder CDs sound so bad! :mad:

But, by convention, linear PCM at any bit depth or sample rate is considered "uncompressed".


The first compression stage is called "microphone". A 3D longitudinal
field is reduced to 1...5 scalars. For typical rooms and frequencies
this is a compression by 1 : 10^7.
Title: Is compression used in CDs?
Post by: plazz on 2002-07-10 22:12:57
Quote
Originally posted by rjamorim


I would believe that, when Sony and Philips engineers developed the CD standard, they looked for settings that sound good for almost everyone: 44.100Hz, 16bit, stereo.


Sony and Philips developed the CD, but the "blueprint" for encoding audio digitally at 44.1KHz was developed in the 1920's or 30's, by a guy who died a few months ago. Can anyone remember his name? I remember the newspapers crediting him as one of the founders of the "digital revolution".
Title: Is compression used in CDs?
Post by: [JAZ] on 2002-07-10 22:38:03
Quote
was developed in the 1920's or 30's


Man! at that time things were analog! not digital (even the "wannabe computers".)

The reason of the 44100Hz , as I've read somewhere, is due to the VHS. They chosed a rate that could contain the "usual" human hearing ( 20hz-20Khz), and that it was a multiple of ....  something about the VHS... can't remember.. but it is related to that.
There was already the intention of leaving some extra margin, to avoid the nyquist frequency problem, and it is the reason of why CD are said to have a lowpass filter at 20Khz (or that they should).
Title: Is compression used in CDs?
Post by: Frank Klemm on 2002-07-10 22:39:34
Quote
Originally posted by plazz


Sony and Philips developed the CD, but the "blueprint" for encoding audio digitally at 44.1KHz was developed in the 1920's or 30's, by a guy who died a few months ago. Can anyone remember his name? I remember the newspapers crediting him as one of the founders of the "digital revolution".


Refutable.

The 44.1 kHz can't be discussed in 1920's or 30's.
This would violate the principle of causality.
(44.1 kHz is TV norm based which were introduced in the 40's and 50's).

Claiming something without any proves seems to be standard in the common time.
Title: Is compression used in CDs?
Post by: smg on 2002-07-10 22:41:52
Quote
Originally posted by Frank Klemm


Refutable.

The 44.1 kHz can't be discussed in 1920's or 30's.
This would violate the principle of causality.
(44.1 kHz is TV norm based which were introduced in the 40's and 50's).

Claiming something without any proves seems to be standard in the common time.

Amen
Title: Is compression used in CDs?
Post by: bryant on 2002-07-10 22:47:58
Quote
Originally posted by plazz
Sony and Philips developed the CD, but the "blueprint" for encoding audio digitally at 44.1KHz was developed in the 1920's or 30's, by a guy who died a few months ago. Can anyone remember his name? I remember the newspapers crediting him as one of the founders of the "digital revolution".
The only person I can think of would be Harry Nyquist. His work in the 20's was originally related to telegraph signals but became the basis of modern sampling theory. But I think he died many years ago. For someone to do work in the 20's and die now, they would have to have lived to 100.
Title: Is compression used in CDs?
Post by: plazz on 2002-07-11 00:02:55
I stand corrected. I has thinking of Alec H. Reeves, who invented pulse-code modulation (PCM) in 1937. The first use of PCM wasn't until 1962.
Title: Is compression used in CDs?
Post by: Frank Klemm on 2002-07-11 01:44:25
Quote
Originally posted by [JAZ]


Man! at that time things were analog! not digital (even the "wannabe computers".)

The reason of the 44100Hz , as I've read somewhere, is due to the VHS. They chosed a rate that could contain the "usual" human hearing ( 20hz-20Khz), and that it was a multiple of ....  something about the VHS... can't remember.. but it is related to that. 
There was already the intention of leaving some extra margin, to avoid the nyquist frequency problem, and it is the reason of why CD are said to have a lowpass filter at 20Khz (or that they should).


U.S. TV is 60 Hz field. Europe is 50 Hz. Least common multiple is
300 Hz. A PCM -> Video converter should work with a multiple of
300 Hz if this device should work with all video recorders.

20 kHz was a common agreement about the upper limit of human hearing
in the late 60's. Before you often find 16 kHz (octavitis: 32, 63, 125,
250, 500, 1k, 2k, 4k, 8k, 16k). A common agreement of this time also was
the +10% (people like numbers starting with 1 followed by only zeros).

20 kHz * 2 * ( 1 + 10% ) = 44 kHz
Next frequency divisible by 300 Hz is 44100 Hz.

This is the right frequency for NTSC free systems. For NTSC systems
the field frequency was adjusted by ca. 0.1% to 59.994... Hz in the
50's to better interleave audio carrier, video carrier and line frequency
to reduce color-in-audio.
So NTSC recodings actually have 44055.9... Hz.

Multiples of these base frequencies you can also find in every Pentium 4-PC
(Timer 0 base clock, because first PCs used CPU clock for color
carrier generation for PC-on-TV usage).

When field frequency in Europe would be 48 Hz (best fit with cinema), the
CD sample frequency would never be 44100 Hz, but may be 44160 Hz.
Field frequency of TV in Europe was fixed in the late 40's.

48 kHz is also a multiple of 300 Hz, but you need 320 lines for 50 Hz
and 267 lines for 60 Hz. But PAL has only 312 lines and NTSC only 262
and lines during the sync pulse are often damaged.

For 48 kHz sample frequency TV has to few scan lines ... ;-)

CD used the common usage sample frequency introduced in the late 70's
by PCM machines. At this time there were a lot of other frequencies from
32 kHz...54 kHz.
Title: Is compression used in CDs?
Post by: SometimesWarrior on 2002-07-11 02:57:03
Thank you for the history lesson, Mr. Klemm!

It's funny how many technological conventions today are so related to each other. It just emphasizes the importance of getting it right the first time, because you may never get another chance to fix it!
Title: Is compression used in CDs?
Post by: gdougherty on 2002-07-11 04:46:44
Quote
Originally posted by bryant
And the data is also truncated to 16 bits, which is yet another form of compression. No wonder CDs sound so bad!


First, on topic comment.  *Some* CD's do use compression, but they're not really considered CD's even though they use CD in their name.  DTS CD's use DTS compression and are recorded on CD media.  Standard CD's that conform to Red Book and are playable on any CD player do not use any compression.

Now, the off-topic reply to Bryant's comment.

Due to the distortion inherent in any PCM sampled audio, 44.1Khz requires a low pass filter, which, if poorly designed and implemented, does have an effect on the audio.  96, or 88.2Khz sampling rates move these distortions way up into the inaudible range and negate the need for a low pass filter.  Arguably a very well designed 44.1 DAC would sound as good as any decent 96Khz DAC unless you're one of the extremely rare people who can hear above 20Khz.

Bit depth shouldn't make any real difference except in edit calculations.  24bit over 16bit just gives you more headroom before the signal clips, so a proper 16-bit recording is capable of having just as much audible dynamic range.  Most equipment (both recording and playback) has enough inherent noise that the dynamic range issue is truly moot.  The public expects music to be squashed down these days anyways, and 14dB of average dynamic range is considered to be a good amount of dynamics that far exceeds the average of any modern pop or rock album.  Classical and Jazz are the real bastions of dynamic range and even there 16-bit as a playback medium is very adequate.

Contrary to your statement there isn't any inherent bit truncation that occurs with 16-bit files.  Music properly recorded at 16-bit and never digitally amplified past the zero mark of 16-bit would never be truncated as I understand things.  Generally 24-bit resampled down to 16-bit using a very good algorithm doesn't necessarily truncate the signal and toss out the dynamic range in the 24-bit sample.  Anything in the dynamics that would be tossed are likely inaudible unless you've got things up so loud that the louder sections would make your ears bleed (ie, it drops the bottom, not the top of the signal).

Listening tests have shown that good digital equipment is on par with analog while also having better s/n ratios.  Crappy analog often "fails" more gracefully than digital, which is the major difference.  Really, digital or analog, good equipment sounds good, bad equipment sounds bad.  IMO, most of the people who ooh and aah over analog are generally hearing what they want to hear or simply prefer the distortions, compression and "warm" inaccuracies often added by analog equipment.

G
Title: Is compression used in CDs?
Post by: JonPike on 2002-07-11 04:55:48
Quote
Originally posted by plazz
Is any kind of compression at all used in audio CD's? I know that there is on DVD's, just at a huge bitrate.


Actually,  in an indirect sense,  the answer may be yes.

I don't know the details,  but I have heard a lot of talk that for the anti-skip feature in portable CD player,  you have a memory buffer, AND audio compression.  For a reasonalble amount of anti-skip time,  you need either a expensively large amount of memory,  or you can do compression on the data,  making your smaller ram buffer "bigger",  and not spend as much...  therby more profit for you and/or cheaper players for your customers.  If this is true,  it would seem the compression isn't the best in the world..  (Hmmm.. developers, need to port Lame or MPC to those little micro's the CD's use!  If they have the grunt to handle it, that is!)

I'd like to hear about this from someone who knows..  many audiophile types say that anti-skip degrades the sound..  and you want a player that either dosen't have it or truly bypasses it when turned off.  I think I might believe them, on my player with my KSC-35's on..  I think I notice a loss of dynamic range, slightly muddy highs, etc.. 

But my CD software can't run ABX...

Jon
Title: Is compression used in CDs?
Post by: godzilla525 on 2002-07-11 06:30:01
I have a portable CD player that has anti-skip memory in it (Panasonic SL-291C).  Just for fun I played a 20-20kHz sine sweep through it.  With anti-skip turned off, the sweep played fine.  When I turned anti-skip on, the disc spindle speed went up to 2x, and pretty much anything above 10kHz in the sweep was trashed--a lot of strange beeping, an increase in background hiss in some places...

I'd say just to leave anti-skip off unless you really need it.

I will say this, though:  This player seems to do incredibly well with quasi 20-bit recordings when using headphones (anti-skip OFF).

Speaking of which, quasi 20-bit is a method of CD-audio compression that uses dithering to make standard PCM 16-bit audio 'sound' more like 20-bit (expands dynamic range), though it injects a small amount of noise into the signal.
Title: Is compression used in CDs?
Post by: bryant on 2002-07-11 06:45:08
Quote
Originally posted by gdougherty
Contrary to your statement there isn't any inherent bit truncation that occurs with 16-bit files.  Music properly recorded at 16-bit and never digitally amplified past the zero mark of 16-bit would never be truncated as I understand things.  Generally 24-bit resampled down to 16-bit using a very good algorithm doesn't necessarily truncate the signal and toss out the dynamic range in the 24-bit sample.  Anything in the dynamics that would be tossed are likely inaudible unless you've got things up so loud that the louder sections would make your ears bleed (ie, it drops the bottom, not the top of the signal).
My statement, like Speek’s, was meant half in jest. People consider the word “uncompressed” to mean that all the original information is available, when actually an enormous amount is discarded when converting from analog to digital and, as Frank points out, there’s an enormous amount discarded even before that when converting from the 3D sound field to a simple microphone feed. If I convert 16/44 LPCM to 8/22 LPCM nobody would call it “compression”, but obviously it is a form of [particularly] lossy compression.

I agree that music originally recorded in 16-bits would not be explicitly truncated, but a 16-bit ADC has an implicit truncation. And when 24-bit data is compressed to 16-bit, the final step is truncation, even if there are noise shaping and dithering operations performed first to lessen the audible impact.
Title: Is compression used in CDs?
Post by: JonPike on 2002-07-11 07:02:20
Quote
Originally posted by godzilla525
I have a portable CD player that has anti-skip memory in it (Panasonic SL-291C).  Just for fun I played a 20-20kHz sine sweep through it.  With anti-skip turned off, the sweep played fine.  When I turned anti-skip on, the disc spindle speed went up to 2x, and pretty much anything above 10kHz in the sweep was trashed--a lot of strange beeping, an increase in background hiss in some places...

I'd say just to leave anti-skip off unless you really need it.


Good test..  I'll have to burn a sweep CD,  and spectum analyze the playback on mine..

And,  you probably could hear enough artifacts and errors, by just listening,  to make it worth bringing one to a store to test players you're considering buying.

Hmmm... wonder if I could use the Creative Labs "what you hear" recording input to get wav files of RightMark's test tones on a CD??  Then play back the output when the program is listening,  and fool it into thinking I'm looping back while playing the CD player?  Hmmm...  (probably "testing" too many things)

Jon
Title: Is compression used in CDs?
Post by: godzilla525 on 2002-07-11 07:57:06
RightMark's test tones are way too short.  They don't even use a sweep, but more of a weird buzz. It would also be tricky to get it timed just right.

I wish I knew of any open-source or free software tools for making sine sweeps and such.  Hopefully someone else does. ???
Title: Is compression used in CDs?
Post by: Mr. Mulder on 2002-07-11 09:59:16
Quote
Originally posted by godzilla525
RightMark's test tones are way too short.  They don't even use a sweep, but more of a weird buzz. It would also be tricky to get it timed just right.

I wish I knew of any open-source or free software tools for making sine sweeps and such.  Hopefully someone else does. ???


Frequency Master Generator 0.93: http://www.hot.ee/smpman/fmg/fmg093.zip (http://www.hot.ee/smpman/fmg/fmg093.zip)

"Frequency master generator" is an universal tool which can be used to produce
different frequency sequences and sounds in special and convenient way.

  Actually, it is a translator, which translates your commands and
synthesizes them in a given order.

  With this program you will able to produce ANY sounds easely even "fantastic"
and "mystic" ones never heared before!

Because of output is standard PCM data .WAV file you can use your new sounds
as samples and instruments in any sound-editor and/or music composing program.

  This program is also very usefull for people who are testing different audio
devices and perceptual audio compressing algorithms ( like MPEG coders ).
They will be able to generate exact and special signals with this frequency
generator.
Title: Is compression used in CDs?
Post by: westgroveg on 2002-07-11 10:05:39
So then if vinyl records are not compressed they should sound better than Compact disc audio with the right record player?.
Title: Is compression used in CDs?
Post by: JonPike on 2002-07-11 10:40:08
I'll have to go looking thru some bookmarks..

In the speaker and audio testing realm,  there is freeware and demoware out there that might give you a deeper analysis.  They might even work under these conditions,  though it's still a wierd setup,  unlike what they're designed to test.

The Cool Edit editor (and more) program,  in case you didn't know about it,  is available as a free demo,  (slightly crippled and "hassleware") that can both generate tone sweeps as well as do nice spectral analysis on the results.    www.syntrillium.com (http://www.syntrillium.com)

We had a thread going a while back on sound cards,  where we got rather into testing with Cool Edit and Right Mark..

If you try this,  one thing we discovered was most cards do better at 48Khz,  at least the Live and Audigy sure do better due to internal conversion.  (or lack of, when you run at 48Khz)  44.1Khz,  you could have HF artifacts above 10Khz with that 20-20Khz sweep,  but they'll be caused by the sound card! 

So, generate a 48Khz wav for your sweep,  it'll be pretty clean.

Just tried this again..  found that most of the noisyness is caused during the playing back of the wav file.  That won't happen when the CD player is playing back. (unless it really is a noisy device!)  But if you want clean "control" files,  you could play back those files..    Also know,  the freq response is much flatter,  and the cards have lower distortion and noise when run in their native 48Khz..

Happy testing..

Jon
Title: Is compression used in CDs?
Post by: KikeG on 2002-07-11 14:18:06
Quote
Originally posted by bryant
And when 24-bit data is compressed to 16-bit, the final step is truncation, even if there are noise shaping and dithering operations performed first to lessen the audible impact.


Well, dithering is considered to be a different thing from truncation, although it is true that at last, and in the strict meaning of the word, you have to do truncation.

But the purpose of dither is to totally eliminate the digital distortion that occurs when you do plain truncation, be it doing bit-depth reduction or a/d conversion. Also, to be able to capture and reproduce signals that are below the 16 bit LSB, again, without distortion (just noise).

Note that dithering should be an inherent part of any properly designed analog to digital conversion process, or bit depth reduction process.
Title: Is compression used in CDs?
Post by: KikeG on 2002-07-11 14:27:16
Quote
Originally posted by westgroveg
So then if vinyl records are not compressed they should sound better than Compact disc audio with the right record player?.


Vinyl records have another form of compression, which is somehow "dynamics" compression at low frequencies (RIAA eq.) , in order to overcome the mechanical problems at the playing stage.

Note that the digital "compression" we are talking about at this thread, translates from a technical point of view into SNR or dynamic range. Note too that the dynamic range of 16 bit cd-audio (~96 dB) is far, far better than the dynamic range or SNR of vinyl (lots of background noise).
Title: Is compression used in CDs?
Post by: godzilla525 on 2002-07-11 18:32:28
Thanks for the links.
Title: Is compression used in CDs?
Post by: westgroveg on 2002-07-12 08:33:23
Quote
Originally posted by KikeG


Vinyl records have another form of compression, which is somehow "dynamics" compression at low frequencies (RIAA eq.) , in order to overcome the mechanical problems at the playing stage.

Note that the digital "compression" we are talking about at this thread, translates from a technical point of view into SNR or dynamic range. Note too that the dynamic range of 16 bit cd-audio (~96 dB) is far, far better than the dynamic range or SNR of vinyl (lots of background noise).


Thanks for clearing that up Kiky.