Digital audio fundamental question

Sawyer

Active Member
Joined
May 21, 2014
Messages
245
Points
28
Location
Pune
First, I am not an engineer. Second, I gave up on mathematics when I came across Calculus.
With that, is there some one that can help me with this in simple terms?
My understanding of digital audio is that it can never replicate an analog wave form perfectly, but can approximate it well enough based on the how content heavy the information it uses is in 0s and 1s, such that a DAC can reproduce the original analog wave form to the degree of accuracy needed for it to sound identical to the original wave form. Or even measure it to be so, using the best of instruments currently available.
I have always thought of this, in simple terms, as drawing a circle with straight sided figures like squares. The more the sides to the figure beyond the 4 in a square, the closer it is to a perfect circle. But no matter how many sides are there, even infinity, in theory it will not be the same as a circle. To the eye, depending on the size of the circle, it will look a perfect circle very quickly, maybe with 20-30 sides to the figure.
Anyone using the Nyquist theorem in reply may please do so without using math!
 
Very interesting. Exactly how I view digital music. And the analogy you have used to define is just perfect.

However, the only fact (which I assume is a fact??) is that though digital is an 'approximation' of analog wave, but it is well beyond our listening abilities or what we can hear, hence, in other words, the limitation to digital music is the listener. Do not know what I am speaking is correct or not, but that is my view.

Unless some one comes in and corrects me, I still believe that digital music may produce an analog wave of sound which may still be a sample of the original (hence the term sampling rate) but that sample is still well beyond our hearing abilities. Hence, addition of any more details is probably not useful to us as a listener.

Regards.

PS: Me not an engineer too, and gave us Maths after struggling with the snakes (read symbol of integral calculus) for 2 years.
 
Unless some one comes in and corrects me, I still believe that digital music may produce an analog wave of sound which may still be a sample of the original (hence the term sampling rate) but that sample is still well beyond our hearing abilities. Hence, addition of any more details is probably not useful to us as a listener.

That was what I think/thought too. But it seems that if you take the CD format, 16/44, it produces an exactly identical wave form as the original for frequencies up to 20khz. If true, that is what I am struggling to get my head around. Nyquist theorem and mathematic are involved in this - if so, what I would love is an English language explanation that squares this circle for me!
 
Similar discussion had happened so please see page 6 onwards.

Bottomline is the Shannon-Nyquist theorem says it can be replicated exactly as long as it is sampled correctly at twice or higher than the highest frequency present in the sampled signal.
 
Similar discussion had happened so please see page 6 onwards.

Bottomline is the Shannon-Nyquist theorem says it can be replicated exactly as long as it is sampled correctly at twice or higher than the highest frequency present in the sampled signal.

I read the thread. Where it does, it only asserts what the theorem says, as you have here. Isn't there someone that can explain this theorem without formulae to non maths people? It isn't anything to do with human physiological restrictions, afaik, within the specified frequencies. The 44 part is selected based on human physiology, but that is just an application of the principles proved, not the theorem itself.
 
On the other hand, while the theory of digital not matching to the exact analog wave is correct, isnt there a fundamental assumption that the analog media is accurate wrt to the original sound produced.

As analog is susceptible to lot more noise and its very difficult to filter the noise from the actual sound, the analog signal produced while similar to what the ear hears and the sound that emanates, it might still be susceptible to corruption due to the nature of the media and the recording.

In modern cases, in any case the recording is in digital form, so converting it to analog has no meaning. So the relevance is obviously to an era of analog recordings only.
 
Interesting, but no.
A quote:
The answer to this question is given by the Nyquist sampling theorem, which states that to well represent a signal, the sampling rate (or sampling frequencynot to be confused with the frequency content of the sound) needs to be at least twice the highest frequency contained in the sound of the signal.
Unquote
I have out the word well in bold.
What I am hearing now is the word perfect. That the theorem proves that the signal/waveform is perfectly represented.
Well is subjective, and can mean many things. That is what I thought till now, actually.
 
isnt there a fundamental assumption that the analog media is accurate wrt to the original sound produced.


In modern cases, in any case the recording is in digital form, so converting it to analog has no meaning. So the relevance is obviously to an era of analog recordings only.
That assumption is a separate issue.

I don't understand the second part, converting to analog is essential for speakers to produce sound. That is what DACs do, else you would not get any sound.
 
Sawyer, try to use ears to analyze this.

  • Take a few LPs. A sample size 10-15 would be good to start with. Samples should be chosen to represent all era and all techs.
  • Hear them in a good analog system of Rs. approx 1 Lac, then in a digital system of similar cost. Note down the observations.
  • Repeat the process for two systems at approx 2 Lac.
  • Then for 4 Lacs, then for 8 Lacs then for 16 Lacs and so on.....

What you will learn is likely to be a lot more profound and real than you can achieve with any discussion like this.
 
Sawyer, try to use ears to analyze this.

  • Take a few LPs. A sample size 10-15 would be good to start with. Samples should be chosen to represent all era and all techs.
  • Hear them in a good analog system of Rs. approx 1 Lac, then in a digital system of similar cost. Note down the observations.
  • Repeat the process for two systems at approx 2 Lac.
  • Then for 4 Lacs, then for 8 Lacs then for 16 Lacs and so on.....

What you will learn is likely to be a lot more profound and real than you can achieve with any discussion like this.
I do not have the money or the access to such systems to do this.
 
Hi Sawyer

My understanding is there is something called aliasing which creates undesirable effects. So when applying Nyquist, all high frequency energy above 22.1 Khz needs to be filtered. Otherwise aliasing will happen. This filtering is done prior to the sampling. These filters add their own noise to the signal. Simple cd players use the standard brickwall filter. More expensive ones use their proprietary filters. Even sampling adds a high frequency note to the signal which is not part of the music signal. This too needs to be removed after the sampling. Here again the expensive cd players/dac do it. It is this noise which the filter and sampling add which messes around with the original music signal. How well you eliminate this noise determines how good your player sounds
 
Hi Sawyer

Upsampling reduces some of the problems mentioned in the earlier post. But upsampling 44.1 khz to 96 khz or 192 khz is not a great idea because its not an integer multiple and as a result a new set of problems can arise. Its better to have a 88.2 or a 176.4 upsampling. Some of the better dacs do this. To my ears they sound much better than a 44.1 khz sampling
 
Dacs bring in filter and electrical interferences into the music signal whereas turntables bring in mechanical noise to the signal. Mechanical noises probably bother people less.
 
First, I am not an engineer. Second, I gave up on mathematics when I came across Calculus.
With that, is there some one that can help me with this in simple terms?
My understanding of digital audio is that it can never replicate an analog wave form perfectly, but can approximate it well enough based on the how content heavy the information it uses is in 0s and 1s, such that a DAC can reproduce the original analog wave form to the degree of accuracy needed for it to sound identical to the original wave form. Or even measure it to be so, using the best of instruments currently available.
I have always thought of this, in simple terms, as drawing a circle with straight sided figures like squares. The more the sides to the figure beyond the 4 in a square, the closer it is to a perfect circle. But no matter how many sides are there, even infinity, in theory it will not be the same as a circle. To the eye, depending on the size of the circle, it will look a perfect circle very quickly, maybe with 20-30 sides to the figure.
Anyone using the Nyquist theorem in reply may please do so without using math!

I've looked at the replies to your questions here and some key aspects are missing.

First and foremost is the assumption that the electronics that implement the digital to analogue conversion (ie. apply Nyquist) are perfect. This is far from the case and lot of the advances in digital sound reproduction have to do with getting the electronics to behave better to the theory. There are lots of distortions that have now been recognized that were not even conceived of when the first digital system were put out and the misguiding by the industry in the early 1980's that we now have perfect sound forever.

Among the more interesting:

Jitter - this is commonly know now and jitter reduction methods include resynching the digital signal just prior to applying the conversion.

Gain riding - This is the electronics imperfection at overshooting or undershooting the analogue converted signal at each sampling point. Its like a momentum of the analogue electrical wave as the DAC converts the digital sample to analogue voltage. The recognition and design to counter this distortion was huge in the late 90's and has results in digital becoming acceptable to analogue diehards as it was a significant improvement in high end dacs sound reproduction. Its still not perfect but with recognition much better. This is still an area of work and, of course, there has been a trickle down of this into lower priced dacs. Digital continues to improve these days at the high-end and trickle down to lower priced dacs (from reputable companies) continues.

Extraneous noise introduction - When the digital pulses enter the dac electronics the peak and valley of the electrical representation of bits (0 volts vs 1 volt) is not perfect. The noise coming into the dac on the digital electrical signal affects the analogue electrical signal (wave). This is why red pens on the edges of CDs or other ways of damping stray light entering the reader which would pick it up as noise helped sound quality. Same exists for file read from HD. Better recognition of this noise on the digital electrical signal and filtering and buffering to separate the digital domain from the analogue within the DAC has brought out huge improvements.

Just a few examples. Nyquist works as a theory. It is the implementation with electronics that is no where near the perfection of the theory.
 
Last edited:
Dacs bring in filter and electrical interferences into the music signal whereas turntables bring in mechanical noise to the signal. Mechanical noises probably bother people less.

The other "secret" is that the mechanical noise can be tuned so that it has a complimentary (I don't mean this as better) effect to the music reproduction. So it becomes a mechanical resonance that can make the music sound more airy or the bass "bigger". Its false but as you note, bothers people less than digital distortions which can be very grating. We used to joke that early digital made our ears bleed. :)
 
I have always thought of this, in simple terms, as drawing a circle with straight sided figures like squares. The more the sides to the figure beyond the 4 in a square, the closer it is to a perfect circle. But no matter how many sides are there, even infinity, in theory it will not be the same as a circle.

So, in the same way, however many samples per second there are in digital sound, one is always going to have steps, even thought the steps get smaller and smaller, right?

Wrong!

And, as engineers and scientists whose attempts to explain this in ways that another maths duffer (me: I didn't even get as far far as calculus, I have problems with arithmetic) can understand, the first thing we have to grasp in digital sound theory (and practice) is that it is counter-intuitive. It doesn't work anything like how we think it works. Leave the "common sense" at the door, because it is only going to hinder on this one :cool:

To go back to your circle analogy. Put down your pencil and pick up a thin, springy metal band. Touch that band to every point, and, if there are enough points, voil, youe will have a circle. What you could not do with a pencil, you can do with your metal band.

I think (not sure, technically) that I can take the analogy a step further: If you take a minimum number of points (3?) there is only one curve that your band can make when it touches them. So, if someone has a curve, and gives you the information about those points, your curve will exactly match his.

(hey, I'm explaining this to myself as I'm going along, and sounds good to me so far :cool: )

So far... this explains how a limited amount of data can be used to reproduce a curve, not approximately, but exactly --- at least on a sheet of paper :licklips:

Apparently, once upon a time in the world of ancient DACs (please remember this is an old story: engineers were doing this stuff in the comms industry when the only form music came in was round and black)... Once upon a time, DACs would see each sample, convert that sample into a sound, and hold it until the next sample, like yes, a series of steps. But DACs have moved on (our understanding hasn't) and something called reconstruction filtering [???] is now doing the job of the metal strip and, subject to bandwidth limitation, outputs exactly the curve that was input.

I was a late adopter of CDs, but I started with PC audio over a decade ago, and had a CD player for a while before that. Let's say 15-20 years of listening to digital music, and yet, it is only a matter of just a few months that I have begun to research this, let alone to get any understanding. It is all new stuff to me. And the fact that DACs do not output small steps really amazed me.

For the jaw-dropping breakthrough with this It is not a series of steps business, I have to thank Xiph Monty. First with his paper here, on 24/96 etc, and then, particularly, with his video presentations in which he really simplifies for duffers like me (perhaps at the cost of some strict accuracy, but didn't all our teachers do that when necessary?)

Another guy who has the knack (and the patience) to teach rocket science to five-year-olds is James D. Johnson. He is J_J on Gearslutz, something else at Hydrogen audio and, for digital music, he is the man. Well, OK, one of the men. :cool:

There are people out there trying to explain this stuff to us (perhaps there are more who are trying to profit by us not understanding). All we have to do is listen. And that's what we are supposed to be into, right? :eek:hyeah:
 
Last edited:
First, I am not an engineer. Second, I gave up on mathematics when I came across Calculus.
With that, is there some one that can help me with this in simple terms?
My understanding of digital audio is that it can never replicate an analog wave form perfectly, but can approximate it well enough based on the how content heavy the information it uses is in 0s and 1s, such that a DAC can reproduce the original analog wave form to the degree of accuracy needed for it to sound identical to the original wave form. Or even measure it to be so, using the best of instruments currently available.
I have always thought of this, in simple terms, as drawing a circle with straight sided figures like squares. The more the sides to the figure beyond the 4 in a square, the closer it is to a perfect circle. But no matter how many sides are there, even infinity, in theory it will not be the same as a circle. To the eye, depending on the size of the circle, it will look a perfect circle very quickly, maybe with 20-30 sides to the figure.
Anyone using the Nyquist theorem in reply may please do so without using math!

First of all, I would like to state upfront that most of the commonly held beliefs on this subject are wrong.

There is no anti-aliasing or "smoothening of jaggies" that goes on. This is not an attempt at approximation. It is instead a strategy to store information about a real world phenomenon (sound) and being able to state confidently that the information that is captured (input sound) is accurate. Which means perfect.

A simple way to visualize this is to think of a sound wave as a sine wave. A sine wave has two characteristics - the height and the width. The height denotes the strength of the sound and the width denotes the pitch (tone) of the sound. So a really loud 20KHz sound would be represented by a sine wave that is crammed together in the X axis (has a very small width), and is also very tall on the Y axis (high volume).

For reference, the width of a 20KHz sound wave is 1.7 cm, and the width of a 20Hz sound wave is 17 meters. (If you want to think of this in terms of time, then 20Hz literally means that air molecules are vibrating at 20 times a second, versus 20,000 times a second for 20KHz). Thinking of this in terms of distance (wavelength) or time (frequency) are thus the exact same thing. This is why the example I gave of the sine wave's X axis refers to distance (wavelength) - but time is implied. Even another way to think about this is that an air molecule has to travel 1.7cm (a short distance) back and forth to produce a 20Khz sound, versus having to travel several meters back and forth to produce bass. Hence the number of times it can travel back and forth (frequency) in a given second is directly proportional to the distance it has to travel (because speed of air molecule is constant at a given temperature).

With this in mind, it is quite easy to see that if you are sampling the wave (storing an analog wave as a set of digital or discrete samples), your worst case scenario will be if a change in height or width happens when the wave is most compressed - i.e. at 20KHz. This means either the volume (height of the wave) changes value, or that the pitch (frequency) changes - to say 19Khz.

Remember, a single wave of a wavelenth has a top and a bottom portion, so Nyquist says that in the worst case scenario where the wave is only 1.7cm in width, if you sample the wave's height twice in this period, you are *guaranteed* to capture any possible change in the wave.

Again, if you think in terms of time, 20Khz means the sound wave molecule is oscillating at most 20 thousand times a second. So any possible change that can happen will happen in 1/20000 th. of a second (or will take longer to happen). So if you capture its state (sample) 40 thousand times a second, you are guaranteed to perfectly capture any and all possible information about the oscillation of the air molecule.

As you can also see, there is absolutely no approximation or extrapolation or guess work involved. That is because we are sampling the sound wave twice as fast as it can possibly move!

The only caveat is of course that this sampling rate is only guaranteed to work if the frequency band is limited to 20Hz - 20Khz.

As you can now guess, if you assume that someone has bat hearing and can hear up to 40Khz, you will now need to sample that sound wave at 80,000 times a second to be able to properly capture the ultrasonic transients and nuances. In other words, if you continue to sample at 40,000 times a second, you can have air molecules that were vibrating even faster (say, 200,000 times a second - or moving only 0.17cm. back and forth). Sure that can be the case. But that also means the frequencies that we failed to capture in our digital signal are all more than 20KHz - and are all beyond human hearing.

Then, there is the real world reality that others have rightly pointed out. In order to limit the sound wave at 20 Hz to 20 Khz, engineers have implemented electronics in certain ways that actually introduce defects in the original wave.

But that is an engineering problem, and has nothing to do with Nyquist.
 
Last edited:
Another stumbling block is that maybe Nyquist theory might not actually explain everything that is happening in digital music. The answer to this is that Nyquist theory is not an explanation, it is the reason the whole thing works.

The theory doesn't exist because of the music; the music exists because of the theory

Someone put this far better than I can. Might have been Monty, see Xiph links above.
 
Well, here is my understanding of Nyquist Theorem and aliasing. What Nyquist says is the usable frequency is half the sampling frequency.

Audio is a pure sine wave.
attachment.php

Let's take a sample equal to the frequency. For simplicity, we take a sample at peaks (which may not be the case in real life). If we connect those dots, this can be the outcome waveform.
attachment.php


Now, lets take the samples 1.5 times the frequency.This will be the outcome. Still not what we wanted.
attachment.php


Let's go to two time sampling rate. We still don't get accurate, but quite close enough to create a wave form out of it.
attachment.php


What if we have sampling rate multiple of frequency?
attachment.php

So, if we want to have frequencies up to 20 Khz, we have to have the minimum sampling rate at twice that. Off course, having more sampling rate will always result in much better wave form.

Hope this explains in layman's term.
 

Attachments

  • Sine_Wave.jpg
    Sine_Wave.jpg
    39.2 KB · Views: 89
  • Sine_Wave_multiple.jpg
    Sine_Wave_multiple.jpg
    37.9 KB · Views: 90
  • Sine_Wave_2x_outcome.jpg
    Sine_Wave_2x_outcome.jpg
    44.9 KB · Views: 89
  • Sine_Wave_1.5x_outcome.jpg
    Sine_Wave_1.5x_outcome.jpg
    45.2 KB · Views: 88
  • Sine_Wave_1x_outcome.jpg
    Sine_Wave_1x_outcome.jpg
    40.5 KB · Views: 90
Buy from India's official online dealer!
Back
Top