IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
Badly drawn waveforms vs. the audio that’s actually output—filters etc, Split from: Jplay - just another scam? Topic ID: 92856
andy o
post Feb 14 2012, 17:20
Post #1





Group: Members
Posts: 1311
Joined: 14-April 09
Member No.: 68950



Is it possible to explain non-mathematically (or just a little) why this linked from Wombat's link is wrong? I know it is, just don't understand it very well.

This is one of the pictures accompanying the article:



QUOTE
I tested some 10 kHz and 20 kHz sine waves that were recorded at several word lengths (16 bit or 24 bit) and sampling frequencies (44.1 kHz, 96 kHz, 192 kHz), analyzing them in a software sequencer.

Isn't that just Audacity? I wonder if they "analyzed them in a software sequencer" to sound more professional.

This post has been edited by andy o: Feb 14 2012, 17:23
Go to the top of the page
+Quote Post
Wombat
post Feb 14 2012, 17:26
Post #2





Group: Members
Posts: 1016
Joined: 7-October 01
Member No.: 235



This is how it looks when just painting lines between the points. A DAC does apply a reconstruction filter. If you measure this sinus played back and attach an oscilloscope you´ll see a perfect sinus. Audacity can´t do better. You may try some application like Audition. You´ll see with these few points it is perfectly possible to reconstruct a clean signal.
Go to the top of the page
+Quote Post
Canar
post Feb 14 2012, 17:34
Post #3





Group: Super Moderator
Posts: 3354
Joined: 26-July 02
From: princegeorge.ca
Member No.: 2796



QUOTE (Wombat @ Feb 14 2012, 08:26) *
You may try some application like Audition.
Last time I checked, Audition sinc-interpolated PCM data points, as it should.

In short, andy o, that looks bad because of an Audacity bug.


--------------------
You cannot ABX the rustling of jimmies.
No mouse? No problem.
Go to the top of the page
+Quote Post
Wombat
post Feb 14 2012, 17:47
Post #4





Group: Members
Posts: 1016
Joined: 7-October 01
Member No.: 235



Hehe, shortly after posting here there was a nice picture posted that tells the whole story smile.gif
Go to the top of the page
+Quote Post
andy o
post Feb 14 2012, 21:52
Post #5





Group: Members
Posts: 1311
Joined: 14-April 09
Member No.: 68950



Ah, I see, thanks
Go to the top of the page
+Quote Post
kraut
post Feb 15 2012, 01:45
Post #6





Group: Members
Posts: 227
Joined: 24-November 10
Member No.: 85965



Those curves are utter bull.
I have used test cd signals of 20 - 20kHz sinewaves on 16 bit 44.1 kHz samples replayed through a micromega stage 2 and various other cd players and any sample that I threw at the player was reconstructed as a PERFECT sinewave - as displayed on an external oscilloscope.
Go to the top of the page
+Quote Post
andy o
post Feb 15 2012, 03:05
Post #7





Group: Members
Posts: 1311
Joined: 14-April 09
Member No.: 68950



This seems very obvious, but I'll ask anyway. Has anyone made an actual wave that looks like that (I assume it can't look exactly like it), and played it alongside that misrepresentation of a 44.1kHz sine? They should sound completely different, shouldn't they?
Go to the top of the page
+Quote Post
Arnold B. Kruege...
post Feb 15 2012, 13:50
Post #8





Group: Members
Posts: 3700
Joined: 29-October 08
From: USA, 48236
Member No.: 61311



QUOTE (andy o @ Feb 14 2012, 21:05) *
This seems very obvious, but I'll ask anyway. Has anyone made an actual wave that looks like that (I assume it can't look exactly like it), and played it alongside that misrepresentation of a 44.1kHz sine? They should sound completely different, shouldn't they?


If you wanted to make a wave that looks like the Audacity fictional waves, you'd have to use a far higher sample rate because the rounding that proper wave display programs like Audition provide is the result of applying the effects of an ideal brick wall filter ("sinc filter").

That means that the weirdness from Audacity is a consequence of something very much like a DAC that lacks a reconstruction filter. DAC's that lack a proper reconstruction filter are the rage among some audiophiles. I know of no DBTs comparing DACs the same resistor ladder with and without proper brick wall reconstruction filtering.

I can speculate with some technical support that there probably isn't an audible difference due to the presence or non-presence of a reconstruction filter, as long as the equipment downstream from the DAC has low nonlinear distortion. As a rule I would expect that they would sound very similar unless significantly nonlinear equipment were used for monitoring. Of course, SET amplifiers and some tweeters are significantly nonlinear.
Go to the top of the page
+Quote Post
db1989
post Feb 15 2012, 14:02
Post #9





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



QUOTE (Arnold B. Krueger @ Feb 15 2012, 12:50) *
DAC's that lack a proper reconstruction filter are the rage among some audiophiles.
That’s ironic, considering how often the square-/pointy-wave fallacy is trotted out by anti-digital ‘audiophiles’…
Go to the top of the page
+Quote Post
icstm
post Feb 16 2012, 11:56
Post #10





Group: Members
Posts: 121
Joined: 25-January 12
Member No.: 96698



QUOTE (Wombat @ Feb 14 2012, 16:47) *
Hehe, shortly after posting here there was a nice picture posted that tells the whole story smile.gif
where is the nice picture? That is really important to share!
The whole point of FFTs is that using if I am drawing what the FFT has stored in the time domain (ie if I am drawing sine waves) then I only need a couple of points to draw a PERFECT reproduction!
That is one of the biggest issues that people need to first get their head around when understanding digital audio.

when you see an irregular wave, what you need to ask your self is "what regular wave would I have to add together (ie what frequencies would have to be simultaneously present) to create the irregular wave I see”

so an irregular sine wave is in effect a regular one augmented with higher or lower frequency wave to varying amplitude.

Each of the additional waves only needs a couple of points to represent their frequency. As per usual it appears that CA article really doesn’t get what the Nyquist theorem is saying…

However it is right when it says that it is possible for a perfect 8kHz signal sampled at 96kHz to sound better than sampled at 192kHz if the DAC has trouble with 192kHz (ie is a cheaper DAC). The whole point is that a perfect DAC will produce a perfect 8kHz signal when sampled at 16kHz. But the quality of the output has little to do with the conversion and more to do with the analogue output. One of my earliest posts on HA was asking about DACs in AVRs as I am keen to understand the practicalities on consumer grade stuff.

QUOTE (my earlier post)
What determines a good DAC?
I assume the main issues are post the conversion to analogue and that these issues are the usual ones that impact an amp (pre or power), such as clean power supply, suitable analogue filters, etc.
However are there any differences in the digital part of the amp (such as up/over sampling circuits, or the conversion itself)?
Go to the top of the page
+Quote Post
db1989
post Feb 16 2012, 14:52
Post #11





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



From that link:
QUOTE
The dots represent finite voltage values that are fed in sequence as a stream to the DAC, which then produces a stair-stepped output, after which a low-pass reconstruction filter smooths out the signal. What I want you to notice is how jagged the lines are at standard Redbook CD 16/44. The DAC and reconstruction filter's job is to make these jagged lines more sinusoidal, so that it will be like the music that was recorded, which is also sinusoidal. There are various ways of applying filters, and we won't get into that here, but I was really surprised at how poorly the 16/44 digital stream is representing the original 10 kHz sine wave. Notice that even at 16/96, the lines are not all that smooth. But, at 16/192, the sine wave looks very good. If we were observing a 10 kHz sine wave coming off an LP and displayed on an oscilloscope, it would be essentially sinusoidal, not jagged (it would not be perfectly smooth of course, as there would be at least a little distortion in the signal being played).

Translation:
1. Hardware after the CD player will smooth the waveform
2. The unsmoothed wave looks bad
3. Therefore, vinyl

Does anyone else see something missing here?

But! There is for this purpose one simple manoeuvre, wherewith the inconvenient requirement of logical progression is vanquished. Behold! the silver bullet:
QUOTE
There are various ways of applying filters, and we won't get into that here, but I was really surprised at how poorly the 16/44 digital stream is representing the original 10 kHz sine wave.
‘There are filters, but they don’t fit with my argument, so I’m going to brush them off altogether and DIGITAL SUX.’

I only read this one paragraph, and I’m already staggered by the level of disengenuity/dishonesty.

This post has been edited by db1989: Feb 16 2012, 15:00
Go to the top of the page
+Quote Post
xnor
post Feb 16 2012, 15:04
Post #12





Group: Developer
Posts: 586
Joined: 29-April 11
From: Austria
Member No.: 90198



QUOTE
If we were observing a 10 kHz sine wave coming off an LP and displayed on an oscilloscope, it would be essentially sinusoidal, not jagged [...].

Well, it's exactly the same case with a 44.1 kHz sampled signal that went through the reconstruction filter of an (oversampling) DAC...

How can they simply get away with spreading such kind of misinformation?

This post has been edited by xnor: Feb 16 2012, 15:05
Go to the top of the page
+Quote Post
kraut
post Feb 16 2012, 15:09
Post #13





Group: Members
Posts: 227
Joined: 24-November 10
Member No.: 85965



QUOTE
(it would not be perfectly smooth of course, as there would be at least a little distortion in the signal being played).


I have compared digital signal with perfect reproduction of sinusoidal waveforms and no sidebands of the fundamental (or at least none that I could see in my Oscilloscope) and the sinusoidal crap that comes from a tests LP, with a lot of harmonics all over the place.
I have also checked out IM pictures from a CD that were simply perfect. All measured of course at the analogue output of a CD player.

Just listen to a 1kHz or above sine wave from a test LP - the harmonics produced are in the audible range. I am always astonished to then go back to music where those harmonics are hidden and how good in comparison a LP still can sound despite all the crap the system produces.

This post has been edited by kraut: Feb 16 2012, 15:10
Go to the top of the page
+Quote Post
xnor
post Feb 16 2012, 15:37
Post #14





Group: Developer
Posts: 586
Joined: 29-April 11
From: Austria
Member No.: 90198



Here's a proper screenshot (adobe audition) of a 20 kHz sine wave sampled at 44.1 kHz:
Attached Image


2x oversampled:
Attached Image


4x oversampled:
Attached Image


8x oversampled (2x zoom so that the samples are still visible):
Attached Image


16x oversampled (4x zoom so that the samples are still visible):

Attached Image


Many DACs oversample by a factor of 128..

This post has been edited by xnor: Feb 16 2012, 15:38
Go to the top of the page
+Quote Post
Wombat
post Feb 16 2012, 16:20
Post #15





Group: Members
Posts: 1016
Joined: 7-October 01
Member No.: 235



QUOTE (icstm @ Feb 16 2012, 11:56) *
QUOTE (Wombat @ Feb 14 2012, 16:47) *
Hehe, shortly after posting here there was a nice picture posted that tells the whole story smile.gif
where is the nice picture? That is really important to share!

Sorry, the link was to computeraudiophile and after this thread here was splitted the link was gone:
http://www.computeraudiophile.com/content/Why-2496-not-24192

QUOTE (xnor @ Feb 16 2012, 15:37) *
Here's a proper screenshot (adobe audition) of a 20 kHz sine wave sampled at 44.1 kHz:

Thank you very much for these pics xnor. Fascinating how things work, isn´t it?
Go to the top of the page
+Quote Post
phofman
post Feb 16 2012, 16:43
Post #16





Group: Members
Posts: 300
Joined: 14-February 12
Member No.: 97162



Guys, please do you know of any open source editor which displays the wav correctly, i.e. using the sinc filter? Thanks.
Go to the top of the page
+Quote Post
pdq
post Feb 16 2012, 16:49
Post #17





Group: Members
Posts: 3392
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



QUOTE (phofman @ Feb 16 2012, 10:43) *
Guys, please do you know of any open source editor which displays the wav correctly, i.e. using the sinc filter? Thanks.

Audition?
Go to the top of the page
+Quote Post
dhromed
post Feb 16 2012, 16:55
Post #18





Group: Members
Posts: 1303
Joined: 16-February 08
From: NL
Member No.: 51347



If you only need it for quick demonstration purposes, Adobe Audition has a trial version.
Go to the top of the page
+Quote Post
Arnold B. Kruege...
post Feb 16 2012, 17:11
Post #19





Group: Members
Posts: 3700
Joined: 29-October 08
From: USA, 48236
Member No.: 61311



QUOTE (xnor @ Feb 16 2012, 09:04) *
QUOTE
If we were observing a 10 kHz sine wave coming off an LP and displayed on an oscilloscope, it would be essentially sinusoidal, not jagged [...].

Well, it's exactly the same case with a 44.1 kHz sampled signal that went through the reconstruction filter of an (oversampling) DAC...

How can they simply get away with spreading such kind of misinformation?


In fact, a 10 KHz wave from a CD player is typically far more perfectly sinusoidal than that coming off of a LP. Think of THD as a way for characterizing how non-sinusoidal a signal is, because that is what it is. The THD of a 10 KHz wave coming off of a CD will be on the order of 0.01% or less, even for fairly humble hardware. The THD of a 10 KHz sine wave coming off a LP might be from 100 to 1,000 times that!

This post has been edited by Arnold B. Krueger: Feb 16 2012, 17:13
Go to the top of the page
+Quote Post
phofman
post Feb 16 2012, 17:25
Post #20





Group: Members
Posts: 300
Joined: 14-February 12
Member No.: 97162



QUOTE (dhromed @ Feb 16 2012, 16:55) *
If you only need it for quick demonstration purposes, Adobe Audition has a trial version.


Thanks for the tips. I would like to run it in linux, and use more often than for a trial smile.gif
Go to the top of the page
+Quote Post
xnor
post Feb 16 2012, 17:41
Post #21





Group: Developer
Posts: 586
Joined: 29-April 11
From: Austria
Member No.: 90198



I'm not sure if there are any free tools available that don't just draw straight lines. But you could resample to some (much) higher sample rate to take a look at the waveform.
Go to the top of the page
+Quote Post
phofman
post Feb 16 2012, 17:43
Post #22





Group: Members
Posts: 300
Joined: 14-February 12
Member No.: 97162



QUOTE (xnor @ Feb 16 2012, 17:41) *
I'm not sure if there are any free tools available that don't just draw straight lines. But you could resample to some (much) higher sample rate to take a look at the waveform.



Well, resampling to pixels is what have used so far. But not very comfortable though :-)
Go to the top of the page
+Quote Post
wakibaki
post Feb 18 2012, 21:10
Post #23





Group: Members
Posts: 37
Joined: 23-July 11
Member No.: 92474



QUOTE (greynol @ Feb 17 2012, 20:09) *
Put another way it is impossible to know with any certainty the amplitude of a pure tone with only two regularly spaced points per cycle.

Ah, no, this isn't true. The only point at which reconstruction falls over is when the sampled waveform frequency reaches exactly half the sampling frequency or exceeds it. Below the Nyquist frequency there is one, and only one sinewave of a given frequency and amplitude which can be drawn through any two points (per cycle) on the graph.


I saw somebody asking about other problems inherent in sampling and reconstruction.

The 2 most obvious are ADC and DAC nonlinearity. These are fairly easy to understand. This is where the voltage intervals in either device don't exactly coincide with their numeric representation. A 16-bit DAC should be capable of outputting 65536 equally spaced voltages. This is not always the case. The spacing may vary from step to step, or there can even be values missing.

Less commonly understood is the sampling (or playback) instant.

Thinking in terms of the graph, in order to accurately record and play back a sinewave, the line must have no thickness and the points on the graph must be dimensionless. To put this another way, the sampling must be done instantaneously i.e. it must take no time at all, because if it takes time then the value can change over the time that the sampling takes. Similarly, on the playback side, a DAC would be required to output extremely short (zero duration, in fact) pulses of a given amplitude.

It is impossible to meet these goals. An ADC can employ a circuit called a sample-and-hold to reduce the duraation of the sampling instant, but the time taken is always finite. We know as well that the output from the majority of DACs is not a series of very short duration pulses, but a staircase function. In terms of re-drawing the graph, if the point is of finite size or is stretched into a line then there is an uncertainty about exactly where to draw the line of the reconstruction.

These sampling and reconstruction problems give rise to what are called sin x/x (sin x over x) errors. Such errors do not make digital recording/playback systems unusable, but they need to be taken note of, and in some instances a correction must be applied.

w

This post has been edited by db1989: Feb 21 2012, 11:20
Reason for edit: first paragraph is now irrelevant due to having been a misunderstanding (see topic 93589) about a now-split thread (see below)


--------------------
wakibaki.com
Go to the top of the page
+Quote Post
db1989
post Feb 21 2012, 10:53
Post #24





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



Split: Representing frequency of n Hz needs sampling rate >2n Hz, not =2n

This post has been edited by db1989: Feb 21 2012, 13:09
Reason for edit: Thanks to 2BDecided for pointing out that my link was to this same thread… :D
Go to the top of the page
+Quote Post
KMD
post Feb 22 2012, 13:57
Post #25





Group: Members
Posts: 123
Joined: 21-January 09
From: UK
Member No.: 65825



The digital waveform in the first picture is a plot of the samples. It is a correct plot of the samples . The nearer the audio signal frequency gets to half the sampling frequency the more pronounced those undulations in the digital waveform get, and the spikiness. At just under half the sampling frequency there is only two sample per period of input frequency and those samples can be near the peaks or near the zero points . The undulations and spikiness wont be in the output of the reconstruction filter.
Go to the top of the page
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 27th August 2014 - 13:11