Sample Rate Confusion

  • Thread starter Thread starter PHILANDDON
  • Start date Start date
P

PHILANDDON

New member
So,

I had always assumed that the higher the sample rate the better because a higher sample rate more closely resembles the analog wave form (this is putting aside the question of whether the higher rate will sound better when converted to 44.1 for CD production).

But recently I read something on this site that made me think otherwise. The gist of what the person said is that higher rates just mean that higher frequencies get sampled. In other words, at 44.1 the analog wave form is sampled up until 20khz. At higher rates, higher frequencies get sampled BUT NO ADDITIONAL INFORMATION IS OBTAINED CONCERNING those frequencies that are sampled at 44.1

Is the true? Is this how sampling works? If so, I don't see how DVD-Audio is such a great thing (unless you're into the surround sound thing). How important is it really that frequencies which are inaudible to the human ear get sampled?
 
Pretty close. At 48K a 24K signal gets two "samples" across its wave, making that the highest frequency that can usably be sampled. At 96K, that 24K signal gets 4 "samples" across its waveform, and the system could actually usably sample signals up to 48K. One of the big advantages to the whole 96K thing is the extreme upper frequencies are more open and natural sounding because there's a more accurate picture getting taken up there (twice as many samples at the 24K frequency range, trickle the math down to 12K...). I'm sure there's more technical info about it, but that's a layman's vantage.
 
If it were not for the anti-aliasing filters, you (the original poster) would be correct.

Sampling at 44.1 kHz requires a filter with a sharp cutoff around 20 kHz. An ideal filter would allow everything below the cutoff to pass unchanged, and cut everything above the cutoff. In the real world, the stuff below the cutoff does get changed (frequency-dependent phase changes, resonance, etc.). If the cutoff is at 20 kHz, the chances are close to certainty that the filter will have some effects within the range of human hearing. The higher the cutoff frequency can be made, the less likely that there will be significant audible artifacts (partly because the frequency is higher, and partly because the filter slope can be more gentle).

Thus, if we're sampling at 96 (or 88.2) kHz, the cutoff can be around 40 kHz, and it should sound better than the same sound sampled at 44.1 kHz.

HTH,
Don
 
Last edited:
It is exactly BECAUSE of the anti-aliasing filter that the original poster is correct. The lowpass filter ensures that the waveform coming out is exactly what it should be and contains accurate information all the way up to the brickwall filter.
This is a critical point that people often miss regarding digital audio. It doesn't matter where on the waveform a sample lands, the information will always be accurate up to the filter frequency and no additional information need be gained below that.

The insinuation that Neelix made:

(twice as many samples at the 24K frequency range, trickle the math down to 12K...).

is actually entirely incorrect. It doesn't matter how many samples represent a waveform - it will never be "jagged" or incorrect in any way after the filter. All that matters is that there are enough samples to recreate the specific frequency... which there always is, up to half the sampling rate.

Don's point about the filter being higher is the sole "benefit" of high sampling rates, and whether or not this matters much is very hotly debated even among experts. Particularily with today's oversampling converters, the brickwall filter is so steep anyway that it generally doesn't touch the audio band at all even at 44.1Khz. Even the phase linearity is very good all the way up. Keep in mind these aren't analog filters (which the earliest DAC's used), or even approximations of them. The idea is that the converter oversamples (often by as much as 128x - this allows for the extreme steepness of the filter) then applies a linear-phase digital filter to the signal. To see approximately what kind of effect this has on the audible signal, run a Waves Linear EQ on your master buss and do the steepest possible cut starting at around 21Khz. Hear any difference? I highly doubt it. There's practically no phase anamolies, thanks to the latency, and no resonance to speak of (if you used the correct non-resonant mode).

There is also some talk that very high sampling rates are actually less accurate than lower sampling rates (within the audible band) because the very high switching rate puts huge stress (and brings out error) in supporting analog circuitry of the converter. Dan Lavry has a paper on this.
 
The filters were put there to provent the AD's from trying to sample anything PAST their highest usable point (half the sampling frequency as we both have said). There is nothing incorrect about my post at all. It's just approaching it differently. The problem isn't the filters - those are there to get rid of the symptoms of the problem. With 96K converters, the "problem" is now an octave higher (way out of human hearing range), and not only are we getting twice as many samples at any given frequency, we're also not forced to filter out everything above 20K (or 24K as the case may be).
 
Neelix said:
and not only are we getting twice as many samples at any given frequency, we're also not forced to filter out everything above 20K (or 24K as the case may be).


They key point is that this (bolded part above) doesn't matter a bit. You could have two samples per second representing a frequency or 200,000 samples, it will sound exactly the same after the antialiasing filter so long as it is under Nyquist.
 
I think the key problem with antialising filters is that, while they're supposed to be brickwall-type filters, they aren't always. If you have an oversampling converter, great, but a lot of folks don't. For them, the built-in analog filters often can't compete with doing a digital downsampling with anti-aliasing in post production. There's nothing quite like audible HF roll-off to ruin your day. :D

Also, a higher sampling rate has advantages if you are doing time/pitch scaling of the recorded audio (e.g. Auto-Tune). If an algorithm works by faking information between samples (though I can't think of any that do other than crude downsampling), the more frequent the samples, the more likely it is that nearest neighbor or weighted averaging will result in a reasonable value, as opposed to doing more complex math....

In the case of pitch correction, higher sample rates allow for better pitch accuracy within a given time window, particularly if using autocorrelation. (Using an FFT, you can simply use a larger window, though this has other problems.)

Anyway....
 
dgatwood said:
I think the key problem with antialising filters is that, while they're supposed to be brickwall-type filters, they aren't always. If you have an oversampling converter, great, but a lot of folks don't.

What? Practically every modern made-for-recording (and most consumer products too) converter uses oversampling. It'd be silly not too... it's cheaper, easier, and gives nearly theoretically perfect results. Show me some evidence (or at least, examples) of these "lots of folks" that are still using analog filters in their converters.

For them, the built-in analog filters often can't compete with doing a digital downsampling with anti-aliasing in post production.
I'm not sure what you mean by this. What does digital downsampling have to do with converter oversampling in the context of this discussion?


I mostly agree with your points regarding pitch correction etc. In fact there can be other audible benefits to running other plugins, ie EQ and compressors, at higher sampling rates, but any benefits will depend on how (poorly) they're designed. I discussed this with Nika Aldrich over at PSW and he seemed convinced that well-designed software/plugins shouldn't be affected by sampling rate. He knows far more about DSP than I, so we left it at that. I do know that I can hear a difference when I do a mixdown at higher sampling rates, probably because my plugins aren't top-shelf, but this has nothing to do with actually RECORDING at that rate to begin with. I can get away with just doing a high-quality ITB upsample just before mixdown on all my files.
Search the PSW if you're interested. There is an absolutely tremendous amount of discussion on sample rate there, by folks who live and breathe the engineering behind it.
 
I actually was looking for info on my hardware before I posted it, which is what prompted my comment. I couldn't find any evidence that the Delta 1010LT has oversampling. I could just be missing it.... That's a relatively popular card around here. Of course, that's not saying it doesn't, but there was a heck of a lot of analog hardware on that board when I last looked at it.... :D

As for the contention that an optimally-written plug-in should be able to handle any sample rate equally... yes, that's completely true... but show me an optimally-written plug-in. :cool:

But seriously, there's the difference between what is possible and what is practical. In theory, you could just resample the audio to a higher rate using a curve fitting algorithm that forces the first derivative to be continuous, and it would probably rock. Or you could probably get pretty close with wavelets, I think, though I'm less familiar with wavelets than I probably should be.... I'm not a DSP person, I just dabble a little in my spare time. I'm a kernel geek, mainly....

The point is that most programmers don't do that stuff because it is computationally hard, not to mention hard to write. More likely than not, they do trilinear interpolation or something to effectively increase the number of samples when determining minima/maxima, and other such tricks, but the more such tricks you do, the worse your performance, so there are limits.

The result is that at some point, the developer makes the call that it is 'good enough' accuracy. At that point, typically you still would get somewhat better accuracy at a higher sampling rate (I think...). Whether the difference is noticeable depends on what the plug-in is doing and how many compromises the developer made between speed and quality (and whether the developer chose 'speed' or 'quality').

I guess the point is that you can't (easily) change the compromises in a random plug-in's code, but you can change the sampling rate of your recordings.
 
The greater the number of square pegs, the better they all fit in a round hole.
 
Good A/D and D/A at 44.1 kHz can very accurately reprocuce a signal up to 20k inpractice and perfectly in theory. But you should know that changing sampling rates during the process produces artifacts.

Here's a useful article
 
, ' , ' , ' , ' ,:':,:':,:':,:':

I think the second one looks a little more like a sine wave (sorry, best I can do with ascii characters). 2 samples per cycle in the first, 4 in the second. For a 24K signal, thats the difference in 48K and 96K sampling. More natural? Looks like it to me. So you're telling me that it doesn't matter how many samples are taken at a given frequency, they'll sound the same??? I don't think so. The square pegs analogy is right on the money!
The filter is our cure for the artifacts caused by having fewer than 2 samples per cycle.
 
Digital signal theory and the Nyquist criterion are not intuitive. A/Ds and D/As are not connecting dots.
 
apl said:
Digital signal theory and the Nyquist criterion are not intuitive. A/Ds and D/As are not connecting dots.

I know, but you see what I'm getting at. I think different people here are approaching from different angles - theory and application.
 
Go to Dan Lavry's site and download his white paper on sampling theory. It's very technical, but there is still a lot a non-engineer can get from it. Here's his site, follow the link ot the "support" page:

http://www.lavryengineering.com/index_html.html

After you've read the first couple pages to get some background, jump to page 23 and you'll find the section of the paper that covers exactly what we are discussing in this thread. It's quite fascinating.

There's also a discussion at prosoundweb.com about this sampling theory paper. You find it here:

http://recforums.prosoundweb.com/index.php/t/2997/1341/?SQ=d6cf53677cac9ba09d65bdef3d5c23f2
 
apl said:
Good A/D and D/A at 44.1 kHz can very accurately reprocuce a signal up to 20k inpractice and perfectly in theory. But you should know that changing sampling rates during the process produces artifacts.

Here's a useful article

That's an old article. Still good sampling info though.

I'd be interested to know his ideas about optimizing WinXP, SATA, and Sonar4 together.
 
Neelix said:
So you're telling me that it doesn't matter how many samples are taken at a given frequency, they'll sound the same??? I don't think so. The square pegs analogy is right on the money!

That is precisely what we're saying, and I'm sorry for your refusal to believe it, but that doesn't change the facts. I understand that this can be difficult to grasp because it initially defies our visual way of looking at waveforms. There's also a lot of very bad analogies being thrown around about digital audio that are totally inaccurate. The worst are the ones that compare an increased sample rate to things like increased resolution in a computer bitmap.
You're right when you say that LESS THAN 2 samples/second for a given frequency will cause problems. But anything <2 is above Nquist and will be filtered out.
2, 4, 200, 44,100.... it really, truly, makes no difference in the sound. "More natural" has nothing to do with it.
Converters recreate an analog waveform through sound mathematical principles. The idea is that because a waveform is a continuous signal on a 2-dimensional graph, you only need a certain about of information in order to perfectly reproduce it. In other words, for any given points that have been sampled, there is only one "correct" way that the resulting waveform can be, and the DAC can figure out exactly what that is.
The sample points don't even have to land on the peaks of the wave. They can be anywhere in between... even at DC, and the DAC will know what the waveform's supposed to look like.
More information than this is purely superfluous. You will not get a more natural wavform, nor more open highs, nor ANY detectable (or, hell, non-detectable) difference in the waveform by having more samples than you need to represent its frequency (2/second).

I should note that I also have problems discussing this in the context of a certain number of samples representing a certain frequency, because it doesn't directly work like that, especially since a music waveform is not usually a continuous sine wave. I am persuing this way of thinking only because you brought it up and so I hope it makes the basic concepts easier to understand.
 
Also, when I talk about the DAC "knowing" the mathematics behind how to accurately reproduce a waveform, I'm actually talking about the antialiasing filter.
It seems strange but when you filter out all frequencies above Nyquist, suddenly the waveform becomes what it's supposed to look like. This is the magic of the filter.
I'll try and find (or make) some graphic examples later.
 
Neelix said:
So you're telling me that it doesn't matter how many samples are taken at a given frequency, they'll sound the same??? I don't think so. The square pegs analogy is right on the money!
The filter is our cure for the artifacts caused by having fewer than 2 samples per cycle.

Neelix, you really need to download that Dan Lavry paper and read it. There are certain elements of this argument that are very counter-intuitive. To look at graphs on a page and say that there is less space between the dots at 96k and therefore it is better is really not how it works.

The paper I linked to gives a very complete and thorough discussion of this, by a designer of top quality converters. It explains how an analog waveform is sampled at 44.1, converted to digital and then back to analog, and then recreate the original wave. Just as well as 96k.

bleyrad said:
It seems strange but when you filter out all frequencies above Nyquist, suddenly the waveform becomes what it's supposed to look like. This is the magic of the filter.
I'll try and find (or make) some graphic examples later.

bleyrad, there are some great graphic examples in that Dan Lavry paper I linked to. The appropriate part of the article starts on page 23, bottom of the page.
 
okay,

so if i'm following the argument, why all the fuss about high sample rates? 96k, 192k. What about DSD/SACD technology? I've read that it most closely resembles the analog wave form. But there's filtering in that technology too; so what difference does it make?

Isn't the filter just a mathematical guess about what the wave form looks like at any given time? Isn't it better to have the real information (i.e. high sample rate) than to guess at it?
 
Back
Top