• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

nyquist theorm and sampling ?

piako

[H]ard|Gawd
Joined
Apr 5, 2006
Messages
1,613
ok, so I recently figured out that while our computers hold cd audio recorded at 44 kHz (if you got cd audio) when you go to playback that audio the audio is passed though a low-pass filter and downconverted to 20 kHz before coming out of your speakers.

I was a little dissapointed to learn that cd audio only represents the band from 20 kHz to 20 Hz. I figured 44 kHz = 44 kHz.

Basically how this works is that when they started to mess around with cd audio they were having a problem when they were recording audio they would get distortion on the playback

think of it this way, high frequencies such as harmonics may exceed the 44 kHz sampling rate and when recorded only are sampled at a fraction of what they actually represent (a continuous wave), instead you are getting at 44 kHz chopy blocks of high harmonic frequencies that when played back at the same sample rate of 44 kHz you get distortion. to solve the problem they cut the sample rate in half to make the audio sound acceptable w/ less distortion (eliminating the distortion would be impossible if I understand this correctly). so basically say that a 55 kHz tone is a harmonic of your recording and you record at 44 kHz then basically what happens is when that 55 kHz tone is being recorded on your 44 kHz system the entire wave is being undersupported by the sampling rate and thus the playback is sent down to 20 kHz to make you think you don't hear the remnants of the 55 kHz tone that was originally there. bascially what they are doing is reducing the prevalence of the vhf (very high freq.) tones in your playback so your brain doesn't percieve the effects of the alias affect.

interesting huh?

this is the only explanation i have found of why they half the sample rate.

is this correct?

so lets say these x characters represent your continuous 44 kHz recording

xxxxxxxxxxxxxxxxxxxxxx

with a sound of 55 kHz you would need more x's to represent that sound correctly (in it's full correct sound wave).

xxxxxxxxxxxxxxxxxxxxxx(xxxxxxxxxx) <-- these are not recorded (in fact the audio bits not recorded would be spread out over the entire wave to look something like this.) the () meaning dropped sound information your brain expects to hear

x(x)x(x)x(x)x(x)(x)x(x)x(x)(x)x(x)x(x)x(x)x(x) <-- just an example

basically the 44 kHz standard doesn't account for the 'space of sound,' only a fraction of it.

that's why dvd audio I guess is so nice. :D
 
I just compared some DVD-a to CD and i could tell the difference. i used shakira (yeah i know :p) oral fijación vol. 1 which comes with a dvd-a and a cd audio 2 ch format. the cd audio sounded muddled in certain portions and some of the timbers were incorrect in their db compared to the dvd portion. the dvd was richer and the instruments had better overall balance. imo. great sound. i was confused for a while because i was asking this guy about how os x interprets and handles higher sample audio and he reminded me about the nyquist thing which prompted this thread because i didn't realize that the low-pass converters were used. now i'm wondering if you use dvd-a what that sample rate is on the system when it reports the audio sample rate.

it's interesting because even the wikipedia article on dvd says that the sample rate is 48000 hz when it acutally is 96000 hz. the 48000 only represents the downconversion. the audio is capture at 96000 right for dvd-a and then played back at 48000?
 
I want to say that sampling rate and the frequency are two seperate things. Sampling rate denotes the number of digital bits in one second making up the apparent analog output waveform of a specific frequency. Therefore a 20kHz tone (or any frequency) from a CD is created from a digital source with a sampling rate of 44kHz always. And yes, a CD's output frequency response or bandwidth is about 20Hz - 20kHz since higher frequencies go unnoticed. I dont think the low pass filter has an effect on the sampling rate.
 
I think I'll do some more research on this...most of my info is a bit rusty but the chart below looks good...except for the fact there are two channels in CD audio format.
 
It sounds like you've read some of the recent threads this week, but unfortunately the theories you put together are not entirely correct. It is good to know that you are keeping an eye in the forum before posting, but I'll see if I can make sense of this for you...

Nyquist theorm basically says that if you want to represent (record or playback) a signal frequency as discreet samples, you need to take about 2x samples for the frequency.

In photography (which is the easiest way to describe this), it can be measured as the number of black/white lines in a given area... Obviously for one period (black-white) you need at least 2 lines...one period = 2 samples.

diagrams_0605_hf_nyquist2.png


Of course, if your speaker jumped between these extremes instantly it wouldn't sound that good...so we can introduce some greys to ease the transition...

diagrams_0605_hf_nyquist3.png


That basically explains why you need 2x the samples to represent a frequency. Here is a final graphic to show a waveform...it is more complicated, but should help show why you can't go beyond nyquist resolution with the first graph...there isn't any real data there at all. As you get more samples per period you get more accurate representation. You get poor representation near nyquist resolution, and better representation at lower frequencies for a given sample rate. Some people support higher sampling rates like 96KHz because it offers more resolution at 22.05KHz frequencies (along with frequencies we can actually hear such as 14KHz), where 44.1KHz sample rates don't do so well.

diagrams_0605_hf_nyquist.png


As for your idea on the low-pass filter, it isn't that there is always a filter, it is that the nyquist resolution stuff reduces the possible frequency that can be represented with a given sample rate. A low-pass filter passes low-frequencies and cuts off high-frequencies, so it is used in subwoofers. A high-pass filter does the opposite, and sees use in tweeters. Subwoofers are best at bass (and suck at high frequencies) and tweeters are best at the high frequencies (and suck at bass). Etc, etc.

As far as the frequency response as your soundcard goes though, that is another story that you want to ignore when you're just trying to figure this out. ;)




Oh, and there is another wrench in the gears to consider. :D

When you're playing music back on your PC, there is this convinient little problem. An audio CD (and most MP3/WMA files) have a sample rate of 44.1 thousand samples per second. Your computer's native sample rate is 48 thousand samples per second. Your computer needs to smoothly stretch those 44.1K samples into 48K samples each second. Some data is repeated, some might be dropped...but how do you accurately represent those frequencies without changing them during this conversion? I don't even want to think about it that much :p

diagrams_0605_hf_nyquist_conversion.png


In Windows you need to go through Adjust Audio Properties and make sure you're at the best conversion setting...or if you have certain sound cards you can force your computer to natively run at 44.1K samples per second, or even 96K samples per second (or more)...but remember that whenever you have the rates not matching 1:1 you need to resample...just imagine what kind of effects that has on how sounds actually sound before the soundcard even gets to amplify it...this is one reason why people historically disliked computers as an audio source, but things have improved since the older days...
 
I still see a lot of confusion in explaining this one, but the original explanation of they had to use 44KHz because they were getting distortion at 20KHz rate is pretty bogus.

The low pass filter part is because if any signal above the 22.05 KHz was to make it out of the filter, it would be simply a noise signal that would interfere with the antialiasing of the digitized signal in teh D/A process. Hence a very high db/octave filter was designed, and was termed a 'brickwall' to anything over 22.05 KHz. Of course this filter itself was difficult to create with the technology of the day and was made irrelevant by oversampling and using a lower db/octave filter that worked at a higher frequency.

But...the nyquist theory is correct.
 
Your side not about data rate conversion, it was pretty bogus for computer sound card makers to not natively use the CD standard data rate frequency. This is why an anaolg signal out connection is on the back of all computer cd players, in case your sound card can't do the conversion.
 
This is more simple than everyone is making it. There are two things that are getting mixed together that need to be separated. Sampling rate and bit depth.

Sampling rate
This is the 48kHz that everyone is talking about in CD audio. Nyquist theorem just states that you need a minimum of 2x the sampling rate of whatever frequency you want to hear. Anything less than that rate and you may have losses. The illustration with the sine/cosine wave is correct and is the reference signal. All other types of waves that you may hear about such as square wave are just a combination of the frequency of a sine wave at the same frequency of that square wave and regular multiples of 2,3,4, and so on.... frequency of sine waves. You'll have to believe me on that or dig into some math books for that explanation. This means that if you can hear a 20kHz sine wave and that is your upper limit of hearing, then a 20kHz square wave will sound exactly the same to you (be aware that at lower frequencies, such as 500Hz sine wave vs. 500Hz square wave, they will sound different) because the other parts of that square wave (the higher frequency sine waves when mathematically added with the 20kHz base sine wave) are in audible to you.

So a cd audio's sampling rate of 48kHz is sufficient enough for human hearing since 22kHz is pretty much the maximum that most people can hear. Most normal people top out around 18kHz already.


Ok, the next item that needs to be separated is the bit depth of that recording. This is probably where the main improvement that DVD-A offers over CD-A. Believe it or not, all recordings are compressed to some degree. Remember that sound loudness levels come in the range from 0dB and on up? Sometimes it's called dynamic range which is semi correct. I'll just take whatever info was in the thread that CD-A is 16 bits and DVD-A is 24 bits. Now go back to that last sine wave plotted with 9 sampels or a 4:1 sampling rate. Notice, the first point is (0,0), (1, .707), (2, 1) and so on? The bit depth recording changes the y-axis numbers. For easy math, if you have a 5 bit recording that goes from 0 to 1, then the y values that you can choose are 0, 0.25, 0.5, 0.75, and 1. Since that first sample rate's point is at (1, .707) some interpolation needs to happen so during the analog to digital conversion process, that point gets recorded as (1, 0.75). It's actually not as bad as it looks because some earlier digital conversions were actually done at 8 bits which sound just fine. Anyways, with 24 bits over 16 bits, I have more fine graduations with the y value that can be picked. This either can translate to a greater dynamic range, OR a loud part that won't clip. When recording companies setup, they always have to set the levels. This means that they have to set the maximum recording level at the maximum that their recording device can handle.


That's about as condensed as it gets while still being understandable. Now there's some food for thought =P. I should get like a 20 plus post count for typing that.
 
As a side-note on DVD-A, the feature I like is that it opens up the realm of 5.1 music recording. CDs are limited to stereo. I got a few CDs recently that came bundled with a DVD 5.1 version. Let's just say the 5.1 is the musician's playground. While the fun may not be realistic in the physical world, it is a new medium for artistic expression. (for example, one track the drums continuously move in a circle around the speakers).
 
Rix2357 said:
This is more simple than everyone is making it. There are two things that are getting mixed together that need to be separated. Sampling rate and bit depth.

Sampling rate
This is the 48kHz that everyone is talking about in CD audio.

Nah...

CD is 44.1 KHz sample rate, DAT was 48 KHz, since DAT was a recordable format, the point was to make DAT machines format different from CD format in order to prevent digital copy of CD format sound (copy protection) onto DAT devices.

The reason CD rate was decided to be 44.1 KHz is because NSTC and PAL video formats could be stored on it since 44.1 KHz is an even multiple of both video formats data sampling rates... which was convenient for hardware availability: CD format was created by Sony (and Phillips together if I remember correctly) using off the shelf available digital video processing electronic devices.
 
If you will notice, I have changed my earlier responses after reviewing some of my old textbook material. I was mistakenly thinking it was a single 16 bit stream, where it is actually two bit streams in the CD format.
 
BBA said:
The reason CD rate was decided to be 44.1 KHz is because NSTC and PAL video formats could be stored on it since 44.1 KHz is an even multiple of both video formats data sampling rates...
You lost me on that one. Of which NTSC or PAL rate is 44.1 KHz an even multiple?
 
piako said:
I just compared some DVD-a to CD and i could tell the difference. i used shakira (yeah i know :p) oral fijación vol. 1 which comes with a dvd-a and a cd audio 2 ch format.

Sorry for the off topic but isn't shakira signed with sony? And by that I mean I doubt it was DVD-A you were listening to, Sony would probably want to release using their own hi-rez format, SACD.

Just throwing the facts out there, not looking to pick a fight. :p
 
BBA said:
Nah...

CD is 44.1 KHz sample rate, DAT was 48 KHz, since DAT was a recordable format, the point was to make DAT machines format different from CD format in order to prevent digital copy of CD format sound (copy protection) onto DAT devices.

The reason CD rate was decided to be 44.1 KHz is because NSTC and PAL video formats could be stored on it since 44.1 KHz is an even multiple of both video formats data sampling rates... which was convenient for hardware availability: CD format was created by Sony (and Phillips together if I remember correctly) using off the shelf available digital video processing electronic devices.


oops, sorry if I dropped the ball on the sampling rate for CD's. I'm pretty sure it is probably at 44.1kHz. My point was to separate what was being mixed together.

I believe CD's were patented by Phillips since they wanted to make all the other studios that used copy protection schemes that did not adhere to the cd format drop the logo on compatibility. Technically, if a cd can't be played in a computer cd rom then can it be called a cd anymore? A computer cd rom is still a cd rom.
 
Actually a low-pass filter is appiled to the data BEFORE it is sampled. The low-pass filter is set to the upper freq of the sampling rate will allow without aliasing (using the nyquist theory) this is 1/2 the sampling rate. The reason the low-pass filter is needed before sampling is due to the fact that you will get aliases from higher frequencies if you do not.
 
mikeblas said:
You lost me on that one. Of which NTSC or PAL rate is 44.1 KHz an even multiple?

Simple history from : http://www.answers.com/topic/compact-disc

The sampling rate of 44.1 kHz is inherited from a method of converting digital audio into an analog video signal for storage on video tape, which was the most affordable way to get the data from the recording studio to the CD manufacturer at the time the CD specification was being developed. A device that turns an analog audio signal into PCM audio, which in turn is changed into an analog video signal is called a PCM adaptor. This technology could store six samples (three samples per each stereo channel) in a single horizontal line. A standard NTSC video signal has 245 usable lines per field, and 59.94 fields/s, which works out at 44,056 samples/s. Similarly PAL has 294 lines and 50 fields, which gives 44,100 samples/s. This system could either store 14-bit samples with some error correction, or 16-bit samples with almost no error correction. There was a long debate over whether to use 14 or 16 bit samples and/or 44,056 or 44,100 samples/s when the Sony/Philips task force designed the compact disc; 16 bits and 44.1 kilosamples per second prevailed. The Sony PCM-1610 and PCM-1630 are well known examples of PCM adaptors used in conjunction with the Sony U-matic VCR.
 
ReD DrakE said:
Sorry for the off topic but isn't shakira signed with sony? And by that I mean I doubt it was DVD-A you were listening to, Sony would probably want to release using their own hi-rez format, SACD.

Just throwing the facts out there, not looking to pick a fight. :p

Sony(at least the music division) has all but abandoned the SACD format, so it wouldn't suprise me if it was DVD-A.

It's a shame there had to be a standards battle in the high res audio formats, since it's going to end up killing both of them. Most people don't know or give a shit about high quality audio though, so it may have been doomed anyways.
 
m1abram said:
Actually a low-pass filter is appiled to the data BEFORE it is sampled. The low-pass filter is set to the upper freq of the sampling rate will allow without aliasing (using the nyquist theory) this is 1/2 the sampling rate. The reason the low-pass filter is needed before sampling is due to the fact that you will get aliases from higher frequencies if you do not.
Which is exactly my point. The 1/2 implementation of the d/a conversion is hardware limited. Which means that audio sampled at 44,000 samples per second exists on your system as only 20,000 but your system reports it as '44,000' which it is not. The 44,000 is only indicative of the original sample. Or perhaps your comptuer actually holds the 44,000 samples and only plays back 20,000 because there is also a low-pass filter during playback I've read. Which means that for dvd-audio which samples at 96,000 samples per second you are getting then 48,000 audible samples per second. Sa-cd is like what 2 million?
 
piako said:
Which is exactly my point. The 1/2 implementation of the d/a conversion is hardware limited. Which means that audio sampled at 44,000 samples per second exists on your system as only 20,000 but your system reports it as '44,000' which it is not. The 44,000 is only indicative of the original sample. Or perhaps your comptuer actually holds the 44,000 samples and only plays back 20,000 because there is also a low-pass filter during playback I've read. Which means that for dvd-audio which samples at 96,000 samples per second you are getting then 48,000 audible samples per second. Sa-cd is like what 2 million?
This whole thing is becoming quite confused.

The Nyquist theorom at work here does not apply strictly to digital audio, CD, DVD or anything else sound related; it applies to any numerical representation of an analog wave. This could be earthquake vibrations, water ripples or anything else that changes value over time. It's a science thing.

When the CD was being developed, they didn't 'run into' this problem, the issue was quite well understood as the original thereom was presented way back in 1915. Quite to the contrary, the CD format was designed with exactly this in mind, based on the fact the the sensitivty of the human ear peters out around 20khz. As the thereom states you need a minimum 2:1 ratio of samples per frequency, the 44.1khz sampling rate was standardized. The engineers knew full well that the higher the sampling rate the better the quality, but chose this value as an economic compromise.

I think you may be confusing the 20,000 figure as samples, which they are not. Those are 20,000 cycles per second, as in 20khz audio frequency. Two completely different things. So, the pc is playing back all 44,100 samples every second, resulting in a maximum 20khz audio wave. You are not missing half the samples. If your pc played back only 20,000, that would mean the highest frequency it could reproduce would be about 10khz. After this we can start talking about oversampling.

btw, since I bet most audio you listen to is stereo, it's techincally 88k samples per second ;)

[edit]

Some wiki quotes of value... It's all too easy to start a whole flame war on the percieved audio quality of different formats, so for the sake of this thread topic I will not add any additonal personal comments...

The frequency response of vinyl records may be degraded by frequent playback if the cartridge is set to track too heavily, or the stylus is not compliant enough to trace the high frequency grooves accurately. The RIAA has suggested the following possible losses: down to 20 kHz after one play, 18 kHz after three plays, 17 kHz after five, 16 kHz after eight, 14 kHz after fifteen, 13 kHz after twenty five, 10 kHz after thirty five, and 8 kHz after eighty plays.

Critics of compact disc audio have observed that more recent digital audio systems are being designed to use higher sampling rates (for example, 96 kHz) and finer quantization (for example 24 rather than 16 bits per sample), and state that this would not be done if it did not bring some audible improvement to the output. However, the use of high sampling rates beyond 44.1 kHz is seen by many digital audio enthusiasts, engineers and professionals as being unnecessary (see Nyquist frequency)[7]. Although finer quantization would theoretically bring about audio improvements, it is believed by some that this might not be noticeable to most human ears. Finer quantization allows more resolution during the mastering process by preventing cumulative degradation, but does not offer large benefits on playback.

One last thought... whether or not you can improve percieved audio quality by increasing the sampling rate or bit depth, a key factor not often considered is the fact that most popular music today is beat to death in the mixing and mastering processes, because studies have indicated that the average listener of 'popular' (and I use that phrase very loosely) music prefer the over-squashed, highly compressed sound, completely defeating any value of higher bit depth in particular. There have been some good threads at Hydrogen Audio and the like showing the differences in dynamics of the same album released at different times.
 
http://www.tc.umn.edu/~erick205/Papers/paper.html#sampling

that's what I originally read. the original post was just trying to desribe that because i was interested, and still am.

The sampling theorem is simple enough, but to use it in a digital audio system, two constraints must be observed. The first is that the original signal must be bandlimited to half the sampling frequency by being passed through an ideal low-pass filter; the second is that the output signal must again be passed through an ideal low-pass filter to reproduce the analog signal. These constraints are crucial to sampling, and if not observed will lead to an unwanted effect known as aliasing.

Why is the output signal then again put through a low-pass filter? Wouldn't that 1/4 it?
 
ok this is the last thing i'll say then i'll shut up :D. ok, so I was thinking that if you increased the sample rate very high you would see the alias artifacts disappear. in reality you will never have alias artifacts disappear at any sample frequency. you don't want to x-ray or gamma ray yourself if you get what i'm getting at. so i was reading and yup the 1/2 filtering is critically necessary it seems at any level of recording because of the "higher frequency energies" which reminded me of the electromagnetic specturm. plus the overtones, partials, and harmonics decrease in db so it's almost better to get out of the house and go see a live concert than spending $$,$$$ on a silly tube amplifier system imo to 'hear the hand of god.' but i still like the idea of sa-cd and plan to buy a few in the future once my DVP-CX995V arrives. perhaps the high freq. recordings are detrimental to health because of the fact you are shooting voltage fed waveforms at your ears at high freq, assuming your system can handle high freq. and the only one I know of is the pioneer elite 5.1 systems that get up to 60 kHz.

isn't it interesting that our eyes and ears are essentially frequency sensors? our tongue is a chemical sensor? what if we had a single organ for both hearing and seeing?

also you forgot about the hypersonic effect and that it's been proven people can 'hear/sense' 100kHz tones.
 
The filter is at the same frequency as the high end of response in both cases, so neither effect the sound below the 20 KHz. The low pass filter is what does the antialiasing, because the aliased edges are twice the frequency of the sample rate, a filter resists changes in signal at that high of a frequency and therefore smooths out the signal.
 
piako said:
also you forgot about the hypersonic effect and that it's been proven people can 'hear/sense' 100kHz tones.


That is the first time I have heard about the hypersonic effect, thanks for the link. :)
 
Interesting read on the hypersonic effect.

However, I believe that some differences in sound can be measured, but not heard. This is also probably why I don't subscribe to the boutique cable theories that seem so persuasive.
 
piako said:
Why is the output signal then again put through a low-pass filter? Wouldn't that 1/4 it?
To remove harmonics. Which quantity do you believe is quartered? The sampling rate? Certainly not.
 
piako said:
[Why is the output signal then again put through a low-pass filter? Wouldn't that 1/4 it?
Multiple low pass filters in series do not remove frequencies at an exponential rate. It's like a filter mesh or screen... If you filter gravel to remove the fine dust (high frequencies), then move that gravel to a different place and filter it again with the same sized filter, you'll still end up with all the gravel, but remove any fine dust you might have picked up while shipping it.

[edit]

... and hence the term 'rock & roll' :p
 
Pioneer S-1EX, $9,000.00 :D wow, first I heard of something like that

28 - 100,000 Hz wonder how they sound?, 6 ohm, 89.5 dB
 
What you want is a plasma tweeter design. Thought to offer perhaps the finest reproduction of high frequency audio, capable well into the radio frequency range.
 
piako said:
Why is the output signal then again put through a low-pass filter? Wouldn't that 1/4 it?
Because when the DA plays join the dots to recreate the original signal it uses straight lines. Straight lines are made from harmonics (multiples of the original frequency). Filtering gets rid of the higer frequencies and leaves you with smooth curves.

...if you increased the sample rate very high you would see the alias artifacts disappear...
Moving to a higher sampling rate doesn't get rid of the sampling artifacts it just moves them further up. That could actually help. We can hear up to 20kHz so if you sampled at 500kHz that means that the first aliasing is going to happen around 250kHz way to high up for anyone to notice (hopefully). Although someone is always going to say they can tell the difference. It's just a matter of where do you draw the line

it's almost better to get out of the house and go see a live concert than spending $$,$$$ on a silly tube amplifier system imo to 'hear the hand of god.'
Best idea I've heard in any of these discussions! Just make sure you get a good seat or it all becomes a bit pointless. Then you get into the argument of which seat gets the most accurate sound... Something called personal opinion comes into play which of course has nothing to do with the tube Vs digital arguments.

perhaps the high freq. recordings are detrimental to health
Just like cell phones.

I think you are starting to grasp something most audiophiles haven't. Try asking a top guitarist/pianist/recording Eng which is the "best" guitar/piano/microphone in the world. (Hint: the answer is usually "what sort of sound do you want to make").
 
Back
Top