The myth of high-res audio

nsaspook

Joined Aug 27, 2009
8,393
Well fine, but the exact waveform gets reproduced from a sampling of that waveform. Some how the DAC comes up with a best-fit (or is it an exact analytical) solution?
IMO he pulls a sleight of hand when using the word 'DAC'. As an DAC system it closely reproduces the original waveform but the data stream will generate a stair-step output (zero hold 'DAC' to analog filter to approximate the Sinc function) if we just dumbly decode it to a analog signal without more processing. The fact that the processing is now internally digital so we never see it as a analog signal is a little misleading (I'm sure he knows that) because it's still there mathematically as encoded signal spectra that must be handled by a filter of some kind like Sinc Interpolation/convolution that all have the same mathematical function as a band-pass analog filter.

http://demonstrations.wolfram.com/SincInterpolationForSignalReconstruction/
 
Last edited:

WBahn

Joined Mar 31, 2012
26,398
Nor does it need to know. The original signal is already contained in the digitatized samples. All that needs be done is to filter out the high frequency artifacts of the sampling process.

It is probably impossible to visualize that in the time domain, but dirt simple in the frequency domain.

I need to add a figure to show that in my previous long post.
What might help -- and I just don't have the time to do it nor do I have access to Matlab, which is probably one of the easiest ways to do it -- is to take the frequency spectra of a stair-step signal and then band-limit it appropriately.
 

wayneh

Joined Sep 9, 2010
17,152
The DAC is braindead. You supply a basic 8-bit unipolar DAC with the value 128 and it will produce an output voltage (assuming it is a voltage-output DAC) that is right about 1/2 of it's reference voltage level. That's what it does. That's all it does. It doesn't know what the shape of the waveform is that that value is a part of. It has not way to figure it out. And it does not care.
Ok, yes I get that. Perhaps I shouldn't have used the DAC acronym, if that's not where the interpolation gets done. You have a string of data points, and the signal without some sort of interpolation is zero everywhere else. Somehow, instead, the analog values between the samples are filled in. I think the filtering as nsaspook has mentioned is a big part of the story.
 

nsaspook

Joined Aug 27, 2009
8,393
The reconstruction filter takes the sampled output of the DAC and "fills in" the waveform between the samples. It produces a smooth waveform from the DAC output.
Yes it does "fill in" using Sinc Interpolation but it does that in a way that only has one solution (the original band-limited signal) if sampled correctly. If the samples are not correct (frequency and sample rate) just because it's a nice and smooth output doesn't mean it's a faithful reconstruction.
 

cmartinez

Joined Jan 17, 2007
7,336
just because it's a nice and smooth output doesn't mean it's a faithful reconstruction.
That's what I gathered when he showed the reconstruction of a square waveform. The reconstructed output is in not exactly like original, but it's an excellent approximation if sampling and filtering are done correctly.
 

WBahn

Joined Mar 31, 2012
26,398
Ok, yes I get that. Perhaps I shouldn't have used the DAC acronym, if that's not where the interpolation gets done. You have a string of data points, and the signal without some sort of interpolation is zero everywhere else. Somehow, instead, the analog values between the samples are filled in. I think the filtering as nsaspook has mentioned is a big part of the story.
It IS the story. Recall how the guy spoke repeatedly about band-limited signals. The raw output from a DAC has high-frequency content that is outside the bandwidth of the properly-anti-aliased band-limited input signal. So you need to pass it through a low pass filter (the reconstruction filter) to get rid of the higher frequency artifacts and recover the original band-limited signal.
 

Sinus23

Joined Sep 7, 2013
246
Very informative video in my opinion.

But what I've noticed is that for an example a 1kHz sine wave digitally sampled at 16 bits 44kHz, will sound pretty much just as the original when played back. Until you play the sample at lower speed. When you play it at frequencies where you can't hear the sine wave anymore, like 20Hz and turn the volume up you'll most probably hear an odd artifact like someone using a pencil eraser really slowly in a tin can. Better yet it sounds like just the artifact of a really compressed audio even though it still is a 16bit 44kHz sample.

Your mileage may vary .
 

nsaspook

Joined Aug 27, 2009
8,393
Raw 'DAC' output from a PIC18F25K22 5-bit output from the rand PRNG to repeat the 'random' signal pattern.

Fancy low pass filter (6.2uf to ground from the DAC voltage reference output impedance) directly on the PIC output pin.

Results: Almost looks like a 'real' audio signal.

 
Last edited:

Thread Starter

ErnieM

Joined Apr 24, 2011
8,155
What I should have shows before is the spectrum of the sampled signal:



This is quite similar to the AM signal first shown. In addition to the "carrier wave" (now the sample frequency) we also get frequency artifacts at multiples of the sample rate.

But most importantly is the baseband signal, or the very same signal being samples. There it is plain as day inside the sample output.

To pull another point out of the AM modulation analogy consider the wave itself: a carrier wave where cycle by cycle the peak is determined by the baseband signal. Lean in and look close and it looks the same as the lollipop diagram in the video. With nothing but a diode, resistor and capacitor (and sometimes less) one can "demodulate" an AM wave simply by passing it thru a low pass filter.

Essentially it is samples of data, yet no one has ever asked how an AM receiver interpolates the carrier wave to reconstruct the original signal.

Once again, it is there all along.
 

Attachments

Last edited:

nsaspook

Joined Aug 27, 2009
8,393
There is a small difference here when directly compared to the simple AM diode demodulation. With the DAC we have the case of a mixing function creating energy in new frequencies near possible overlap points with slightly greater than 2X sampling. With the simple AM diode we have an envelope detector (rectifier and a simple peak holding circuit with a short time constant). Now some might argue that an Envelope detector is a form of mixing because the usage meaning of mixing is pretty sloppy in practice but the term envelope detector is usually used when the carrier frequency is much higher than the modulation frequency and filtering is done at RF not audio so our effective sample rates are very high with audio at 5KHz and RF at 1MHz at typical AM. This means reconstruction of the original signal by elimination of near in-band signals (by filter or interpolation) is not needed.
 
Top