HomeHome  CalendarCalendar  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log in  

Share | 
 

 Digital Audio 101

Go down 
Go to page : 1, 2  Next
AuthorMessage
NoCoPilot

avatar

Posts : 13040
Join date : 2013-01-16
Age : 64
Location : Seattle

PostSubject: Digital Audio 101   Mon Aug 25, 2014 8:25 pm

Over on the music forum I researched and posted this. Thought it came out rather nice.

Over on the "Your Old Vinyl Collection" thread I posted a link to an article, entitled "Vinyl vs. CD Myths refuse to die." It's worth reading. In it the author links to ANOTHER article, "Is the sound on vinyl records better than on CDs or DVDs?", which is ALSO worth reading. The author of the first article says, "The content on that [second] page is, frankly, tripe. On a quick scan I counted six outright errors - mostly uninformed opinion being expressed as fact." Then he goes on to say, "Perhaps at some point I'll create a post here specifically refuting the technical errors on that page". A quick search of Rich Pell's articles on EE Times since January 2010 however does not show that he did.

No matter. The refutation is really easy. The article nicely summarizes the surprisingly prevalent misconceptions about digital audio, so I think it might be helpful to an informed discussion to point out exactly what the unnamed author of that undated and unreferenced article got exactly wrong.

It can be expressed in three letters: DAC.

To digitize a signal, you run it through an ADC, an analog-to-digital converter. This slices up the incoming analog waves into 44,000 slices per second based on 65,536 possible values. This part the article got exactly right.

The results are shown on the graph (pink line) overlaying the 10,000 Hz source sine wave (black line) and the graph correctly shows 4.4 samples.

Pretty rough approximation, you have to agree! It looks like a big ugly square wave -- not the nice smooth 10,000 Hz sine wave it is supposed to be reproducing.

If you've ever accidentally hooked up a speaker to a raw digital output (as I have), that's EXACTLY what you hear: ugly screeching square waves!

What the graph fails to point out, and what the author failed to include, and what a lot of people misunderstand, is that we don't listen to this square wave output. The raw digital bitstream must be first run through a DAC, digital-to-analog converter, to turn it back into sine waves so we can listen to it. Once this is done, something very similar to the original waveform comes out.

How similar? Well you might say "There's a lot of missing information in that square wave approximation" (if fact the article's author does say this) but you have to remember two things: 1) the DAC's job is to smooth out the square wave jumps in level (all 65,536 of them) and it uses the same process, in reverse, that the ADC used to create that square wave. Therefore with a matched ADC/DAC pair the end result is very, very close. 2) The example shown in the graph is a 10,000 Hz sine wave. We don't listen to 10,000 Hz sine waves. In fact the frequency range of even the highest percussion instruments, like a triangle, is only 3-5000 Hz. There are overtones and resonances in the 10,000 Hz range, but no fundamentals.

And remember, below 10,000 Hz you're getting a lot more than 4.4 samples per wavecycle. 8.8 for 5,000 Hz, 17.6 for 2,500 Hz, 35.2 for 1,250 HZ and so forth.

So do you lose "overtones and resonances" with a 44 Khz sampling frequency? Not with a good DAC, and not according to Nyquist theorum. If you aren't familiar with Nyquist it's worth Googling.

Going back to the graph above, would sampling at 192,000 times per second (red line) produce a more accurate result? Well yes -- if you were listening to the square wave output. But if you're using a DAC, the answer is, "Maybe yes, maybe no. It all depends on the DAC." Certainly (and proven in numerous double-blind tests) the human ear CANNOT HEAR THE DIFFERENCE under normal circumstances. That's the cold hard truth.

And that is why products that tout "super fidelity" are mostly blowing smoke up your ass (...to get closer to your wallet without being seen).

And why people who say "analog LPs produce a more accurate representation of the original analog signal" are full of shit.
Back to top Go down
View user profile
_Howard
Admin
avatar

Posts : 8223
Join date : 2013-01-16
Age : 74
Location : California

PostSubject: Re: Digital Audio 101   Tue Aug 26, 2014 1:40 pm

Without getting into the CD versus LP debate, I think you greatly oversimplify the problems inherent in encoding (ADC) and decoding (DAC).

It may seem petty, but the way your graph is designed, it shows the CD encoding as a square wave. It is not. A more accurate way to display the difference between an analog and a digital encoding of the wave, would be to just show the information present. Such as this (ignore the little red bits I didn't erase):


[CD Audio Output is the wrong label for this, but I'm to lazy to go back and change it.]

This graph more accurately illustrates the great difference in the amount of information in the digital v analog recordings of the wave form. Those few bytes of information shown as the CD recording must be interpreted by the DAC to be converted into the analog wave for playback.

There is as much - possibly more - argument within the "digital domain" about the quality of the sound produced by various methods of encoding and decoding as there is about whether digital can produce the same (or better) sound quality than analog.
Back to top Go down
View user profile
NoCoPilot

avatar

Posts : 13040
Join date : 2013-01-16
Age : 64
Location : Seattle

PostSubject: Re: Digital Audio 101   Tue Aug 26, 2014 2:50 pm

I get what you're saying, but I disagree with your presentation.

The REASON the first graph (which wasn't "mine" but was lifted from the referenced article) showed the digitized signal as a square wave is that you have discrete level jumps (16-bit, 65,536 possible levels) shown over a set time (in this case, the time it takes a 10,000 Hz wave to make one cycle, which is 1/10,000ths of a second).

Any signal that jumps from level to level, with no transitions in between, will output as a square wave.

Your simplification to just the data points ignores the time element, which is kinda critical.

It's true that ADC is, or has been hotly contested because in the early days of digital audio it was the weak link in the chain. However I think it'd be safe to say this is no longer a weak link, the methodology has been improved to the point that a 10,000 Hz wave sampled 4.4 times can be pretty accurately re-created from just those 4.4 samples. And of course, at lower frequencies (where all the music actually occurs) you have many more samples per wave allowing for even greater accuracy.

One thing I did not include in my original article, in the interests of brevity, is my personal experience with editing digital audio. Many many hours spent chasing clicks and pops as I clean up audio files in preparation for making CDRs out of LPs. I know for instance that a single data point, if way out of line with the ones surrounding it, is audible as a tick. I know that most LP pops are in the range of 5-10 data points. I know that to edit one second of audio is 44,100 data points and takes hundreds of hours to do by hand (yes, I've done it!) The automated "click and pop repair" software only allows you to do 1/10 of a second, 4400 samples, at a time. That's enough to repair any record surface irregularities, but not IM distortion or tracking errors.

When blown up to a big graph 1/10,000 of a second looks like a big deal, but in editing a song it really isn't. It's only 4 data points.
Back to top Go down
View user profile
_Howard
Admin
avatar

Posts : 8223
Join date : 2013-01-16
Age : 74
Location : California

PostSubject: Re: Digital Audio 101   Tue Aug 26, 2014 3:10 pm

NoCoPilot wrote:
Any signal that jumps from level to level, with no transitions in between, will output as a square wave.
Yes, it will. The point I was trying to make is that the digital data stored on any medium is not a signal - it's just data points. The signal has to be created by the DAC, using those few data points. In the case of the analog signal shown on the graph, all of those data are present on the analog medium.
Back to top Go down
View user profile
NoCoPilot

avatar

Posts : 13040
Join date : 2013-01-16
Age : 64
Location : Seattle

PostSubject: Re: Digital Audio 101   Tue Aug 26, 2014 3:20 pm

Look at the red data points you didn't erase.

This represent 192 KHz sampling at 10,000 Hz, but they could also represent 44.4 Khz sampling at a lower frequency (um, 2,296.875 Hz to be exact). I'd say 1) that's a much more USEFUL frequency for music and 2) the digital representation of the sine wave is pretty darn accurate.
Back to top Go down
View user profile
_Howard
Admin
avatar

Posts : 8223
Join date : 2013-01-16
Age : 74
Location : California

PostSubject: Re: Digital Audio 101   Tue Aug 26, 2014 3:38 pm

I just used the 44.1KHz data, as that was what the text of your message mostly referred to, and you also stated that the human ear can't tell the difference between the two.

My only problem is with the way the graph you used represented the data. It incorrectly showed the digital data as an analog square wave. I see that on lots of graphs and it's invalid. Not important; just something that bugs me.

NoCo wrote:
Your simplification to just the data points ignores the time element, which is kinda critical.
There is no length-of-time element in the digital data. Each data point represents one level at one point in time. There are no data representing the analog signal's information between the displayed digital data points. That information is filled in by the DAC.
Back to top Go down
View user profile
NoCoPilot

avatar

Posts : 13040
Join date : 2013-01-16
Age : 64
Location : Seattle

PostSubject: Re: Digital Audio 101   Tue Aug 26, 2014 3:45 pm

True.

And because those transitions are not extrapolated, you get discrete jumps.  Which, if you play that datastream into an output device, is played as a variable-frequency square wave.

Or.... Maybe the output would be a 44,000 Hz variable-amplitude square wave?
Back to top Go down
View user profile
_Howard
Admin
avatar

Posts : 8223
Join date : 2013-01-16
Age : 74
Location : California

PostSubject: Re: Digital Audio 101   Tue Aug 26, 2014 4:38 pm

Getting back to whether CDs or vinyl sound better, there are too many variables to apply a universal answer to this question.

I've heard CDs which were remastered from old vinyl masters and they sounded like shit compared to the vinyl. But that has nothing to do with any lack of quality of digital recording; it's a matter of lousy production, primarily an unqualified producer.

If you want to know whether a specific vinyl recording sounds better than the same recording in digital, you have to listen to those two items on the same sound system and make up your mind.

There is nothing inherent in digital recording that produces lower- or higher-quality sound than analog. Any problem always (almost?) lies in the production.

Back to top Go down
View user profile
NoCoPilot

avatar

Posts : 13040
Join date : 2013-01-16
Age : 64
Location : Seattle

PostSubject: Re: Digital Audio 101   Tue Aug 26, 2014 4:43 pm

There is nothing INHERENT but the simple fact remains: CDs have about 10x the capability of LPs.

Therefore if a CD sounds worse than the LP it's not the format's fault. It's the engineer.
Back to top Go down
View user profile
_Howard
Admin
avatar

Posts : 8223
Join date : 2013-01-16
Age : 74
Location : California

PostSubject: Re: Digital Audio 101   Tue Aug 26, 2014 4:49 pm

NoCoPilot wrote:
There is nothing INHERENT but the simple fact remains: CDs have about 10x the capability of LPs.
What do you mean by "capability"?


NoCoPilot wrote:
Therefore if a CD sounds worse than the LP it's not the format's fault. It's the engineer.
Exactly!
Back to top Go down
View user profile
NoCoPilot

avatar

Posts : 13040
Join date : 2013-01-16
Age : 64
Location : Seattle

PostSubject: Re: Digital Audio 101   Tue Aug 26, 2014 4:53 pm

_Howard wrote:
If you want to know whether a specific vinyl recording sounds better than the same recording in digital, you have to listen to those two items on the same sound system and make up your mind.

i keep hearing this. Am I the only person in the world who can hear clicks, pops, surface noise and rumble???
Back to top Go down
View user profile
NoCoPilot

avatar

Posts : 13040
Join date : 2013-01-16
Age : 64
Location : Seattle

PostSubject: Re: Digital Audio 101   Tue Aug 26, 2014 4:57 pm

_Howard wrote:
What do you mean by "capability"?
Dynamic range, frequency response, wow and flutter, residual noise, transient response.
Back to top Go down
View user profile
_Howard
Admin
avatar

Posts : 8223
Join date : 2013-01-16
Age : 74
Location : California

PostSubject: Re: Digital Audio 101   Tue Aug 26, 2014 5:12 pm

NoCoPilot wrote:
_Howard wrote:
What do you mean by "capability"?
Dynamic range, frequency response, wow and flutter, residual noise, transient response.

Dynamic range, for sure, especially if you use 24-bit resolution ADC and DAC.

Wow and flutter are, of course, not present in digital media, but can be reduced to insignificance with a good turntable (and, naturally, high-quality masters).

I've never found residual noise introduced by vinyl-playing equipment to be significant. Blame the recording environment for most of this.

IMO, the quality of transient response is more a function of the recording process. The mechanical limitations of vinyl and stylus can affect this, of course, but not, I think, to a meaningful level.
Back to top Go down
View user profile
NoCoPilot

avatar

Posts : 13040
Join date : 2013-01-16
Age : 64
Location : Seattle

PostSubject: Re: Digital Audio 101   Tue Aug 26, 2014 5:26 pm

The best LP-to-CD transfer I've ever heard is "Marscape" by Lumley & Lancaster. I had it for a year before I noticed it was an LP dub. Somebody painstakingly removed all the pops and clicks and probably subtly boosted the DR to make it sound like a CD.

Then somebody mentioned it was a dub.

I was skeptical so I pulled out my Stax headphones (system reference!) and listened again. Sure enough, the steady grind-grind-grind of a needle being pulled through a groove was ever present.

Once I heard it I could not miss it.
Back to top Go down
View user profile
_Howard
Admin
avatar

Posts : 8223
Join date : 2013-01-16
Age : 74
Location : California

PostSubject: Re: Digital Audio 101   Tue Aug 26, 2014 5:31 pm

I wish my hearing was still good enough to hear that.
Back to top Go down
View user profile
NoCoPilot

avatar

Posts : 13040
Join date : 2013-01-16
Age : 64
Location : Seattle

PostSubject: Re: Digital Audio 101   Tue Aug 26, 2014 6:11 pm

_Howard wrote:
I wish my hearing was still good enough to hear that.
It undoubtedly is; the noise is not high frequency. I don't know how to describe it except as "surface noise" -- although the term "surface noise" is usually used to refer to the constant "bacon-frying" of a trashed record. What I mean is different, a mid-frequency (and admittedly low level, usually) sound like maybe a wheel rolling across a plate. It's not turntable rumble. It's the sound of the stylus going down the long valley of the groove.

And every LP dub I've ever heard has it (unless there are some that don't and I didn't know they were LP dubs) -- even the ones I made myself. The noise is notable for being stereo -- two channel -- but out-of-phase so on headphones it resides in the ear cups. As a constant mid-frequency noise it's impossible to remove from a file. I tried sampling it and inverting it (the old "noise removal technique") but that just creates aliasing artifacts.

Hey, my new turntable preamp was on the doorstep when I got home. Just hooked it up -- works great! Listening to an old Milt Jackson LP right now.

Time for some serious audiophile listening to see if I can find that "vinyl magic" everyone's talking about!


Last edited by NoCoPilot on Tue Aug 26, 2014 6:46 pm; edited 1 time in total
Back to top Go down
View user profile
_Howard
Admin
avatar

Posts : 8223
Join date : 2013-01-16
Age : 74
Location : California

PostSubject: Re: Digital Audio 101   Tue Aug 26, 2014 6:28 pm

NoCoPilot wrote:
_Howard wrote:
I wish my hearing was still good enough to hear that.
It undoubtedly is;
No. It's not, and hasn't been for many years.
There is a constant high frequency ringing in my ears. Many years ago I went to an ear specialist. The diagnosis was that I had developed tinnitus. Also, I had lost much of the high-frequency response in my right ear. (And back in the days of vacuum tubes and CRT televisions, i was constantly bothered by the flyback transformer noise, which runs between 15 and 50KHz. No one else could hear it, but it drove me nuts.)

The doctor told me that he saw a lot of combat veterans who had the exact same symptoms. Apparently, firing a rifle next to your ear is not a good thing. Whoda thunkit?


Back to top Go down
View user profile
NoCoPilot

avatar

Posts : 13040
Join date : 2013-01-16
Age : 64
Location : Seattle

PostSubject: Re: Digital Audio 101   Tue Aug 26, 2014 6:55 pm

I have tinnitus too. In my case I think it was caused by a few too many loud concerts in my youth. My ears are supremely sensitive to loud noises -- I wear ear muffs when using my radial arm saw, I wear ear plugs if I go to concerts (which I rarely do anymore because concert sound is so universally excreable). If I don't wear protection loud noises are painful and make the ringing worse for hours afterward.

But I don't know how bad mine is. I can always hear it -- particularly in a quiet room -- but having a fan running masks it. I feel like I can still hear music pretty well.

One of the tracks on the CD testing CDR I made myself is a glide tone from 25,000 to 20 Hz. I used to pick it up at about 15-18k. Now it's more like 9-10k I suppose -- and it's a lot more sudden.

Once, a couple years ago, we were having a discussion about tinnitus on my music forum and one of the younger kids wanted to know what it sounded like. I fooled around with my digital recording sofware and laid down two sine waves, one at 5,000 Hz and one at 8,000 Hz (if memory serves). This seemed to duplicate what I hear almost exactly. At any rate, playing the file was excruciating!


Last edited by NoCoPilot on Tue Aug 26, 2014 7:03 pm; edited 1 time in total
Back to top Go down
View user profile
NoCoPilot

avatar

Posts : 13040
Join date : 2013-01-16
Age : 64
Location : Seattle

PostSubject: Re: Digital Audio 101   Tue Aug 26, 2014 7:01 pm

Thought I read recently of a new drug supposed to reduce tinnitus -- and the interwebs sell lots of purported cures -- but the American Tinnitus Association and Medicine.net both say nothing works.
Back to top Go down
View user profile
_Howard
Admin
avatar

Posts : 8223
Join date : 2013-01-16
Age : 74
Location : California

PostSubject: Re: Digital Audio 101   Tue Aug 26, 2014 7:10 pm

Maybe weed. That cures just about everything (at least in your mind).
Back to top Go down
View user profile
NoCoPilot

avatar

Posts : 13040
Join date : 2013-01-16
Age : 64
Location : Seattle

PostSubject: Re: Digital Audio 101   Tue Aug 26, 2014 8:19 pm

Reminds me of an interview I read once with a chronic pain sufferer who'd had the section of his brain which registered that particular pain-- I believe it was back pain -- cauterized.

The interviewer asked him if his back still bothered him.

The guy said no. It still hurt just as much, but he no longer cared about the pain.
Back to top Go down
View user profile
NoCoPilot

avatar

Posts : 13040
Join date : 2013-01-16
Age : 64
Location : Seattle

PostSubject: Re: Digital Audio 101   Fri Nov 03, 2017 9:24 pm

I have a minor, real minor gripe with my digital editing software. Tell me if it's petty.

When you're zoomed in on a sound wave, you use "page up" to go forward and "page down" to go backward. That seems backward to me.
Back to top Go down
View user profile
_Howard
Admin
avatar

Posts : 8223
Join date : 2013-01-16
Age : 74
Location : California

PostSubject: Re: Digital Audio 101   Sat Nov 04, 2017 10:57 am

It should use left and right arrows instead of paging keys. That makes more sense with a horizontally displayed graph.
Back to top Go down
View user profile
NoCoPilot

avatar

Posts : 13040
Join date : 2013-01-16
Age : 64
Location : Seattle

PostSubject: Re: Digital Audio 101   Sat Nov 04, 2017 6:57 pm

Maybe so. With up & down arrows being zoom in and zoom out.

Okay, you've convinced me. Now write it.
Back to top Go down
View user profile
_Howard
Admin
avatar

Posts : 8223
Join date : 2013-01-16
Age : 74
Location : California

PostSubject: Re: Digital Audio 101   Sun Nov 05, 2017 9:10 am

it
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Digital Audio 101   

Back to top Go down
 
Digital Audio 101
Back to top 
Page 1 of 2Go to page : 1, 2  Next
 Similar topics
-
» Paulo Reis will be the new director of the newspaper “Period”
» An email to me, for MM, that 'Things are now being discussed'
» The tapes
» Metodo3 '8 important new leads with Scotland Yard'
» Open for business

Permissions in this forum:You cannot reply to topics in this forum
 :: Topics :: Science & Tech-
Jump to: