Help - Search - Members - Calendar
Full Version: 320 sufficient coming off of CD?
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
isliberty
So I've been thinking a bit about bits, trying to understand what more bits do.

I compare it to taking pictures. It's similar, in that when I take a picture, I am taking a "slice" out of the continuous flow of reality. If I make my slice 1/100 of a second, then I am capturing .01 of a second. Now, if my camera can take 5 pictures a second, I have captured 5% of the second, losing 95%. But that's ok, and most of the time, if I had a choice, I would prefer even shorter slices of reality, such as 1/1000 of a second or 1/2000, since that would freeze motion better.

Now, for bits. If I have a CD that is encoded at 44,100 bits per second, that means it is taking 44,100 samples per second. How "small" is each slice? I know in the case of a camera, the film or sensor is actually exposed to light for that whole 1/100 of a second. But in the case of the CD, how small are each of those 44,100 samples? I would think that they are much, much smaller. HOW MUCH OF THE SECOND HAS BEEN CAPTURED by the 44,100 sampling mechanism?

I would think very little. I mean, one can capture at double that, and at 192,000 without breaking a sweat nowdays. I guess one can even capture at 1 million now, or soon. Does that not mean that our 44,100 has captured very, very little, and we are just guessing (with greater or lesser accuracy, depending on the complexity of the composite waveform at each frequency) at the remainder of the wave?

And then, on top of that piece of miniscule information capture and much guessing, we now encode at 320? We have lost even more.

Does LAME understand that it is encoding off of a CD, most of the time? Are its algorithms different for that situation than when it is encoding, say, off an analog input? If not, aren't there artifacts caused by the interaction between the choppy 44,100 and the subsequent (even at 320) compression?
sizetwo
I can assure you that searching this forum will give you a lot of answers to your rather intricate and strangely formulated questions.
pepoluan
Uh, you mixed "samples per second" with "bits per second".

Okay. Soundwaves are ... waves. To encode digitally, you slice the waves into discrete chunks/slices called samples. Each sample is then measured for its amplitude. The levels of the amplitude depend on the number of bits per sample. E.g. 8 bits per sample = 256 amplitude levels, 16 bits per sample = 65536 amplitude levels.

So. In one second, a CD actually encodes:
1 (second) x 44'100 (samples per second) x 16 (bits per sample) x 2 (channels)
= 1'411'200 bits per second.

Definitely far greater than 192'000 by nearly an order of magnitude smile.gif

Now, such amazingly high number of bits per second... means to encode, let's say, a 4-minute song will need:
= 1'411'200 (bits per second) x 240 (seconds)
= 338'688'000 bits
= 42'336'000 bytes

Okay. You got a great quality WAV file there. But... downloading 42 MB of data over the Internet, especially back in the days of 28.8 kbps modems... that's a helluva long time to be online smile.gif

So, the geniuses behind audio compression devises ways to reduce the amount of information sent. They throw away the redundancies, and also suppress things that human ears can't hear. They do this using amazing algorithms that allows the sound to be reconstructed in some way to resemble the original waveform. Not exactly identical, but the difference should not be audible.

The resulting (compressed) audio stream is now a lot smaller. The actual ratio depends on the 'aggressiveness' of the compression, with a tradeoff: The more aggressive you compress, the more information must be thrown away. At a certain point, the information thrown becomes audible.

MP3's least aggressive compression will result in a file, which when the size is divided by its length, result in 320'000 bits per second, i.e. 320 kbps. But for most songs, this is overkill; various listening tests have proven that over 95% of songs can be compressed more aggressively to 128 kbps without audible degradation.

Other encoding technologies (e.g. AAC, Musepack, Vorbis) have different compression algorithms, and nearly all of them are capable of more aggressive encoding, e.g. down to 112 kbps (even less) without audible degradation.

And finally, your last question. There is no difference between encoding off a CD with encoding off an analog input. Both are sampled using 44'100 samples per second. The source does not matter, as the sampling method is the same.
isliberty
QUOTE (sizetwo @ Dec 11 2006, 20:46) *
I can assure you that searching this forum will give you a lot of answers to your rather intricate and strangely formulated questions.


You are right.

That was a wonderful response! I love it....I may filch it for my own use in my field one of these days.
Mercurio
isliberty your supposes about audio sampling are totally wrong. huh.gif

A sampled waveform is simply another mathematical representation of a signal (sound). If some conditions are verified, this representation is equal to the "analog" one.

Also a sampled waveform doesn't try "to slice" the time... samples are theoretically taken instantly..

QUOTE
HOW MUCH OF THE SECOND HAS BEEN CAPTURED by the 44,100 sampling mechanism?

All the whole second. cool.gif

hint: Think a sinusoid. How many points do you need to reconstruct it perfectly, using... sinusoids?
Mike Giacomelli
QUOTE (isliberty @ Dec 11 2006, 18:20) *
I compare it to taking pictures. It's similar, in that when I take a picture, I am taking a "slice" out of the continuous flow of reality. If I make my slice 1/100 of a second, then I am capturing .01 of a second. Now, if my camera can take 5 pictures a second, I have captured 5% of the second, losing 95%. But that's ok, and most of the time, if I had a choice, I would prefer even shorter slices of reality, such as 1/1000 of a second or 1/2000, since that would freeze motion better.


As you seem to realize, this line of reasoning makes no sense. The ideal case is that you exposure time is 0, thus giving you a perfectly clear image. Its undesirable to capture a non-zero percentage of the the light passing though the lense, and we do it only because we can't make film or CCDs with infinately fast sampling time.
tubeless
hint: Think a sinusoid. How many points do you need to reconstruct it perfectly, using... sinusoids?

There are parallels to this. Yes the whole second has been captured but only with a resolution of 44,100. A 20KHZ wave will be sampled just over two times per second. If you look at theese waveforms in audio editing software, they are no longer sine waves but resemble sawtooth waves. The D/A converter attempts to reconstruct the wave with this limited amount of data and the magnetic inductance and physical enertia of a speaker tend to smooth the accoustic wave which is the last link in the chain to your ears which are analog devices. So these are "slices in time". They are instantaneous only because electrons have little mass and therefore relatively little enertia compared to a camera shutter. 16 bit audio sounds pretty good for most purposes but professional recording studios work in 24 bit. You could say we compress all reality in some form or another. I wish we could come up with a compression scheme for memory, it would make life a lot easier for us 50+ folks.
pepoluan
QUOTE (tubeless @ Dec 13 2006, 01:42) *
A 20KHZ wave will be sampled just over two times per second. If you look at theese waveforms in audio editing software, they are no longer sine waves but resemble sawtooth waves.
Depends on your audio editing software smile.gif CoolEdit / Audition will reconstruct the sine waves properly, placing dots as marker for each sample on the reconstructed sine waves.
sld
QUOTE (tubeless @ Dec 13 2006, 02:42) *
16 bit audio sounds pretty good for most purposes but professional recording studios work in 24 bit.

Mostly because 24bit audio has a larger dynamic range than 16bit audio.
pdq
QUOTE (sld @ Dec 12 2006, 15:44) *
QUOTE (tubeless @ Dec 13 2006, 02:42) *

16 bit audio sounds pretty good for most purposes but professional recording studios work in 24 bit.

Mostly because 24bit audio has a larger dynamic range than 16bit audio.

Also, because multiple stages of processing of the audio data introduce errors, which are insignificantly small if working in 24 bits.
Jebus
QUOTE (pdq @ Dec 12 2006, 12:50) *
QUOTE (sld @ Dec 12 2006, 15:44) *

QUOTE (tubeless @ Dec 13 2006, 02:42) *

16 bit audio sounds pretty good for most purposes but professional recording studios work in 24 bit.

Mostly because 24bit audio has a larger dynamic range than 16bit audio.

Also, because multiple stages of processing of the audio data introduce errors, which are insignificantly small if working in 24 bits.



Right. Just like when you're doing math, you use all the digits you've got in the sub-equations, and then round the final number, in order to get a more precise result.
[JAZ]
QUOTE (tubeless @ Dec 12 2006, 19:42) *
Yes the whole second has been captured but only with a resolution of 44,100. A 20KHZ wave will be sampled just over two times per second. [...]



Sorry to be picky, but there's just one 20Khz sinusoid in a 44Khz signal. ( samplerate = 2 * max frequency )

Also some of you keep mixing sample rate with bitdepth.

bitdepth has nothing to do with time slices (well.. at least not a direct relation), just like the number of colours colours don't have a direct relation to the position of an object in a photograph. (the object will be at the same place in black&white)
Mercurio
QUOTE (tubeless @ Dec 12 2006, 10:42) *
Yes the whole second has been captured but only with a resolution of 44,100. A 20KHZ wave will be sampled just over two times per second. If you look at theese waveforms in audio editing software, they are no longer sine waves but resemble sawtooth waves.


My example about sinusoids was only a simplification, I think we should, once for all, put an introduction of the sampling theorem in hydrogenaudio's wiki. If I find a bit of time I'll start to do it. (but someone should correct my poor English) smile.gif

If you use lines to interpolate the samples (linear interpolation), you get the sawtooth. But why do you use lines?

If you want to reconstruct the "analog" signal from the sampled one, you must use the so called "cardinal interpolation".
Audition (an audio editor) uses it to show the waveform, and this is what you see with only one sample:


This function is called "sinc". If you use one of this for each sample, and sum, you reconstruct a band-limited analog signal exactly as it was. It is not an approximation, it is equal!

Also as [JAZ] said, bitdepth is another story, very different from sample rate: it concerns quantization.
Quantization introduces some noise in the signal.
tubeless
There is some truth to all of these views. I would say that bit depth relates directly to the sampling in that a higher bit depth defines a higher resolution in the amplitud of a waveform. There are more levels possible therefore a more accurate representation of the original wave. Whether the D/A converter chooses to reproduce a sinusoid from two samples is not so relevant as musical audio waveforms as opposed to pure generated sign waves are anything but sinusoids. Higher frequencies ride piggyback on lower frequencies so even a 50 hz wave has a complex form. Higher frequencies of lower amplitude will never cross the zero line until they are carried there by a larger wave. I'm not sure EXACT reproduction of these waves are possible even at 96khz sampling rate & 48 bit depth but the ear is easily fooled and that is a good thing otherwise compression like MP3 would never work. Great thread!
greynol
If I were to guess, I would say you've never taken a course that covered discrete time sampling or Fourier transforms.
Mercurio
QUOTE (tubeless @ Dec 13 2006, 15:26) *
Whether the D/A converter chooses to reproduce a sinusoid from two samples is not so relevant as musical audio waveforms as opposed to pure generated sign waves are anything but sinusoids. Great thread!


I'm very sorry, I wasn't clear. What I said in my previous post wasn't about sinusoids, but about every type of audio signal.
Some time ago (about a century) mathematicians discovered that a band-limited signal can be totally reconstructed by taking only the right number of samples.

This discovery is called the Nyquist-Shannon sampling theorem, and it is the basis of digital audio and beyond. I don't know if you can find a page on internet that explains it in a simple way.

I know, it is very counterintuitive thinking that the "spaces" between samples can be totally reconstructed.

However, if you like threads like this, I suggest you to read also:

http://www.hydrogenaudio.org/forums/index....showtopic=40134
and
http://www.hydrogenaudio.org/forums/index....amp;#entry43985
and
http://www.hydrogenaudio.org/forums/index....d&pid=19328

In each of them the discussion is about the effect of samplerates beyond 44100, and DVD-A and SuperAudioCD.
Gabriel
QUOTE (tubeless @ Dec 14 2006, 00:26) *
Whether the D/A converter chooses to reproduce a sinusoid from two samples is not so relevant as musical audio waveforms as opposed to pure generated sign waves are anything but sinusoids.

(Sinc is an interpolator function, not the signal itself)

ANY signal for which all components are less than half the sampling freq can be represented by a sum of sines and cosines, not just simple synthetic signals but ALL of them.
sld
QUOTE (Mercurio @ Dec 14 2006, 10:22) *
I know, it is very counterintuitive thinking that the "spaces" between samples can be totally reconstructed.

I daresay it is counterintuitive because we aren't taking a mathematical approach.

I was quite amazed with the maths behind the Fourier expansion.
Mercurio
QUOTE (sld @ Dec 14 2006, 01:35) *
I daresay it is counterintuitive because we aren't taking a mathematical approach.


You should choose the right language to communicate... not everyone understand math (as I barely understand English crying.gif )

I think it is counterintuitive also because of some bad (Creative-like) marketing, where you can see some nice drawings of points and spaces and lines and numbers that pretend to explain digital audio.
pepoluan
In the old Syntrillium website you can download an animated 'short course' on what is digital audio. It depicts, with animation the process of ADC and DAC. It's quite good. I have them on my home PC, but unfortunately not my office PC.

Anyone still got it?
Mike Giacomelli
QUOTE (tubeless @ Dec 13 2006, 16:26) *
There is some truth to all of these views. I would say that bit depth relates directly to the sampling in that a higher bit depth defines a higher resolution in the amplitud of a waveform. There are more levels possible therefore a more accurate representation of the original wave.


They're not related.

QUOTE (tubeless @ Dec 13 2006, 16:26) *
Whether the D/A converter chooses to reproduce a sinusoid from two samples is not so relevant as musical audio waveforms as opposed to pure generated sign waves are anything but sinusoids.


All music is composed of nothing by sin waves. In fact, all signals are composed on nothing but sin waves...

QUOTE (tubeless @ Dec 13 2006, 16:26) *
Higher frequencies ride piggyback on lower frequencies so even a 50 hz wave has a complex form.


A 50Hz wave is just a single sin wave. If theres a more complex form, its not a 50Hz wave.

QUOTE (tubeless @ Dec 13 2006, 16:26) *
Higher frequencies of lower amplitude will never cross the zero line until they are carried there by a larger wave.


This doesn't make sense.

QUOTE (tubeless @ Dec 13 2006, 16:26) *
I'm not sure EXACT reproduction of these waves are possible even at 96khz sampling rate & 48 bit depth but the ear is easily fooled and that is a good thing otherwise compression like MP3 would never work. Great thread!


Exact reproduction is impossible regardless since signals in nature have finite resolution, and so can not exactly describe mathematical signals. A good system in DSP is one that produces a signal thats of sufficient quality that the analog domain contributes the vast majority of noise.

This topic has nothing to do with the ear anyway.
Hollunder
QUOTE (pepoluan @ Dec 14 2006, 18:30) *
In the old Syntrillium website you can download an animated 'short course' on what is digital audio. It depicts, with animation the process of ADC and DAC. It's quite good. I have them on my home PC, but unfortunately not my office PC.

Anyone still got it?


Understandable explanations are quite rare and animations usually help a lot.
I'd love to see that, maybe some others too.
bhoar
QUOTE (pepoluan @ Dec 14 2006, 11:30) *
In the old Syntrillium website you can download an animated 'short course' on what is digital audio. It depicts, with animation the process of ADC and DAC. It's quite good. I have them on my home PC, but unfortunately not my office PC.

Anyone still got it?


Yes.

-brendan
pepoluan
QUOTE (Mike Giacomelli @ Dec 15 2006, 06:25) *
QUOTE (tubeless @ Dec 13 2006, 16:26) *
There is some truth to all of these views. I would say that bit depth relates directly to the sampling in that a higher bit depth defines a higher resolution in the amplitud of a waveform. There are more levels possible therefore a more accurate representation of the original wave.
They're not related.
Actually, there is. The discrete nature of sampling obviously must approximate the continuous nature of analog signal.

A *reasonably* accurate representation however is still possible. The limited amplitude levels will result in quantization noise.
tubeless
"This topic has nothing to do with the ear anyway"

Sampling rates and bit depth are quite meaningless to a deaf person are they not? I find it odd that the ear, which is the last link in the audio processing chain has no place in an audio forum.
Mercurio
QUOTE (tubeless @ Dec 18 2006, 17:44) *
"This topic has nothing to do with the ear anyway"

Sampling rates and bit depth are quite meaningless to a deaf person are they not? I find it odd that the ear, which is the last link in the audio processing chain has no place in an audio forum.


Here we like the ears so much, that when we make quality tests we don't want to use the eyes at all biggrin.gif

But this thread started with a theoretical question, and the theory that is used to make digital audio goes beyond audio (it is applied for every signal) - and so beyond the ears.

p.s. do you think your ears can distinguish between audio sampled at 44khz and 32khz, without using eyes? I think it is not so common.
sld
QUOTE (Mercurio @ Dec 19 2006, 11:53) *
Here we like the ears so much, that when we make quality tests we don't want to use the eyes at all

This quote should be stickied to guard against a certain demographic of forumers.

There are some concepts that are much better understood using a mathematical background. Do not scoff at what you do not see.
Mike Giacomelli
QUOTE (tubeless @ Dec 18 2006, 18:44) *
"This topic has nothing to do with the ear anyway"

Sampling rates and bit depth are quite meaningless to a deaf person are they not?


Not if he wants to watch a DVD or look at a digital picture.

QUOTE (tubeless @ Dec 18 2006, 18:44) *
I find it odd that the ear, which is the last link in the audio processing chain has no place in an audio forum.


I said "this topic". I did not say "this forum". The two have very different meanings. If you consider the differences, you will see that this is not at all very odd.
Hollunder
QUOTE (pepoluan @ Dec 14 2006, 17:30) *
In the old Syntrillium website you can download an animated 'short course' on what is digital audio. It depicts, with animation the process of ADC and DAC. It's quite good. I have them on my home PC, but unfortunately not my office PC.

Anyone still got it?


It doesn't cover the ADC/DAC process very well, just quite basically.
Nothing one couldn't learn by reading the one or other thread at these forums or article at wikipedia (probably ha knowledgebase too, a quick search for dac brought up nothing though).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.