# Help understanding audio sampling

Started by April 14, 2007
```Fred Marshall wrote:

...

> However, that perfect situation doesn't happen very often.  In fact
the statistically expected value / location for the input level is half
way between the digital levels.  This means the average "error" will be
43.2/2 or 21.6 microvolts in our example system.

...

Fred,

Isn't the error half that? If the actual falls halfway between
quantization levels *on the average* and sometimes hits a level exactly,
then (with uniform distribution) it would sometimes be a whole level
off. In fact, the maximum possible distance from a level is half an
interval, so the average level must be a quarter.

Your reply contained an attachment, a slide show of 9 pictures (two of
them identical) Some of the pictures may have come from my website. One
shows my snowy back yard in late morning light. What's the story here?

Jerry
--
Engineering is the art of making what you want from things you can get.
&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
```
```Jerry Avins wrote:
..
>
> Your reply contained an attachment, a slide show of two pictures (two of
> them identical) Some of the pictures may have come from my website. One
> shows my snowy back yard in late morning light. What's the story here?
>

I see only one attachment - small .png of the DNR calculation in nice
font. I now have some curiosity about the snowy back yard (he said,

I am trying to work this out:

2 pictures
2 identical
1 = snowy back yard.

My hypothesis:
2 also = snowy back yard?

"some" = ???

Richard Dobson

```
```"Jerry Avins" <jya@ieee.org> wrote in message
news:rJSdnb_CbKoa07_bnZ2dnUVZ_u6rnZ2d@rcn.net...
> Fred Marshall wrote:
>
>   ...
>
>> However, that perfect situation doesn't happen very often.  In fact the
>> statistically expected value / location for the input level is half way
>> between the digital levels.  This means the average "error" will be
>> 43.2/2 or 21.6 microvolts in our example system.
>
>   ...
>
> Fred,
>
> Isn't the error half that? If the actual falls halfway between
> quantization levels *on the average* and sometimes hits a level exactly,
> then (with uniform distribution) it would sometimes be a whole level off.
> In fact, the maximum possible distance from a level is half an interval,
> so the average level must be a quarter.
>
> Your reply contained an attachment, a slide show of two pictures (two of
> them identical) Some of the pictures may have come from my website. One
> shows my snowy back yard in late morning light. What's the story here?
>
> Jerry

Jerry,

I assumed a perfect quantizer that decides which level to output based on
the input being within 1/2 a level distance.  Thus, the peak error is 50% of
a level.  They are never a full level off with a perfect quantizer.

Because the amplitudes are uniformly distributed, the errors peak at 1/2 a
level - so I guess the expected abolute value of an error *is* 1/4 a level.
Good catch.

The attachment was your snowy back yard with a large white sign painted with
black lettering so you can look out and see the equation for qunatization
SNR approximation any time you like!  That's what I get for cut and paste!

Fred

```
```Richard Dobson wrote:
> Jerry Avins wrote:
> ..
>>
>> Your reply contained an attachment, a slide show of two pictures (two
>> of them identical) Some of the pictures may have come from my website.
>> One shows my snowy back yard in late morning light. What's the story
>> here?
>>
>
>
> I see only one attachment - small .png of the DNR calculation in nice
> font. I now have some curiosity about the snowy back yard (he said,
> basking in early heatwave here!).
>
> I am trying to work this out:
>
> 2 pictures
> 2 identical
> 1 = snowy back yard.
>
> My hypothesis:
> 2 also = snowy back yard?

Mistype. A slip of the mind. Goof, whatever. There were 9 pictures, two
of them of the SNR equation. See my revised missive.

Jerry
--
Engineering is the art of making what you want from things you can get.
&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
```
```Jerry Avins wrote:
..
>
> Mistype. A slip of the mind. Goof, whatever. There were 9 pictures, two
> of them of the SNR equation. See my revised missive.
>

Oh well, I guess my ISP must have purged all but one of them. Too
bad...I will just have to use my imagination.

Richard Dobson

```
```"Fred Marshall" <fmarshallx@remove_the_x.acm.org>....

> Jerry,
>
> I assumed a perfect quantizer that decides which level to output based on
> the input being within 1/2 a level distance.  Thus, the peak error is 50% of
> a level.  They are never a full level off with a perfect quantizer.
>
> Because the amplitudes are uniformly distributed, the errors peak at 1/2 a
> level - so I guess the expected abolute value of an error *is* 1/4 a level.
> Good catch.

WTF are you babbling about ?

--
David Morgan (MAMS)
http://www.m-a-m-s DOT com
Morgan Audio Media Service
Dallas, Texas   (214) 662-9901
_______________________________________
http://www.artisan-recordingstudio.com

```
```"Jerry Avins" <jya@ieee.org> wrote in message...

> You can reach the limits of audible frequencies at sampling rates far
> below 96 KHz. You can exceed the accuracy of tape or vinyl with numbers
> smaller that 32 bits.

16 bit, 44.1khz is more than adequate for accurate reproduction within
the range of human hearing... that's why it was chosen 20 years ago
and that is why it is still the standard digital audio delivery medium today.

If anything, the 'bar' of acceptable quality is being progressively and
willingly lowered by MP3, ATRAC and the ongoing host of other data
compression codecs and schemes.

--
David Morgan (MAMS)
http://www.m-a-m-s DOT com
Morgan Audio Media Service
Dallas, Texas   (214) 662-9901
_______________________________________
http://www.artisan-recordingstudio.com

```
```David Morgan (MAMS) wrote:
> "Jerry Avins" <jya@ieee.org> wrote in message...
>
>
>>You can reach the limits of audible frequencies at sampling rates far
>>below 96 KHz. You can exceed the accuracy of tape or vinyl with numbers
>>smaller that 32 bits.
>
>
> 16 bit, 44.1khz is more than adequate for accurate reproduction within
> the range of human hearing... that's why it was chosen 20 years ago
> and that is why it is still the standard digital audio delivery medium today.
>

That's not why it was chosen. It suited video field rates at the time. See:

http://www.cs.columbia.edu/~hgs/audio/44.1.html

Evidence is increasingly being produced (NOT by audiophiles addicted to
snake-oil) to show that (at least for people not impaired by age, discos
etc) sounds well above 20KHz are audible and significant; especially for
the obvious bright sounds such as trumpets, cymbals as so on. And of
course multiple high components will make resultant tones or beats in
the audible range. We now have more microphones able to pick up these
high frequencies; and many speakers are now specified up to at least
30KHz; headphones can go quite a bit higher.

Engineers are stuck with 44.1 so long as CD remains an important
delivery medium. This may not remain the case for much longer.  In all
other situations, 48KHz is the minimum accceptable srate (with 24bit
samples being also preferred, not least so engineers can employ more
pseudo-analog headroom above the nominal 0dB mark). So for all formats
other than  the technically obsolete CD, the new standard is at least
24/48, with 24/96 increasingly popular for audio DVD combined with
lossless data compression. Of course, 96KHz is more arguably
unnecessarily high, but the multiple-of-2 principle (and also the
multiple-of-8) still holds great sway (88.2KHz is also widely supported,
for this reason), and is a lot easier than negotiating some other
arbitrary standard that probably would never secure universal agreement!

Richard Dobson
```
```David Morgan (MAMS) wrote:
> "Jerry Avins" <jya@ieee.org> wrote in message...
>
>> You can reach the limits of audible frequencies at sampling rates far
>> below 96 KHz. You can exceed the accuracy of tape or vinyl with numbers
>> smaller that 32 bits.
>
> 16 bit, 44.1khz is more than adequate for accurate reproduction within
> the range of human hearing... that's why it was chosen 20 years ago
> and that is why it is still the standard digital audio delivery medium today.
>
> If anything, the 'bar' of acceptable quality is being progressively and
> willingly lowered by MP3, ATRAC and the ongoing host of other data
> compression codecs and schemes.

Sure. There are good arguments to be made for more than 16 bits in
places along the processing chain, but 16 bits dithered down from the
processing word width is plenty for reproduction. (You say you can hear
that 17 bits sounds better? Listen in good health!) The anti-alias and
reconstruction filters are easier to build (fewer compromises needed) at
the somewhat higher sample rate of 48 KHz, but that's not the issue.
(Especially for me, with my 4 KHz cutoff. :-( )

I try to avoid numbers in threads like this because they often lead to
unproductive digressions.

Jerry
--
Engineering is the art of making what you want from things you can get.
&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
```
```David Morgan (MAMS) wrote:
> "Jerry Avins" <jya@ieee.org> wrote in message...
>
>> You can reach the limits of audible frequencies at sampling rates far
>> below 96 KHz. You can exceed the accuracy of tape or vinyl with numbers
>> smaller that 32 bits.
>
> 16 bit, 44.1khz is more than adequate for accurate reproduction within
> the range of human hearing... that's why it was chosen 20 years ago
> and that is why it is still the standard digital audio delivery medium today.
>
> If anything, the 'bar' of acceptable quality is being progressively and
> willingly lowered by MP3, ATRAC and the ongoing host of other data
> compression codecs and schemes.

Sure. There are good arguments to be made for more than 16 bits in
places along the processing chain, but 16 bits dithered down from the
processing word width is plenty for reproduction. (You say you can hear
that 17 bits sounds better? Listen in good health!) The anti-alias and
reconstruction filters are easier to build (fewer compromises needed) at
the somewhat higher sample rate of 48 KHz, but that's not the issue.
(Especially for me, with my 4 KHz cutoff. :-( )

I try to avoid numbers in threads like this because they often lead to
unproductive digressions.

Jerry
--
Engineering is the art of making what you want from things you can get.
&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
```