• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Correlation between sample rate and audible frequency?

Pluto

Addicted to Fun and Learning
Forum Donor
Joined
Sep 2, 2018
Messages
990
Likes
1,635
Location
Harrow, UK
For real signals, which are not symmetric in time, this means that you cannot perfectly reconstruct signals up to fs/2. If you want to preserve frequency response and phase up to fs/2, you get pre-ringing in the time domain that was not present in the original signal upon reconstruction
Can you please explain in greater detail, without math. Thanks.
 

scott wurcer

Major Contributor
Audio Luminary
Technical Expert
Joined
Apr 24, 2019
Messages
1,501
Likes
2,824
LIGO is the best! :cool:
But I think they focus on sensitivity, not dynamic range.

There is more than one way to look at DNR vs SNR, it is possible to "blind" an instrument with an out of band signal of sufficient amplitude. Here is a picture I took, there was an earthquake in Japan the day before I visited and I'm not sure this it. You could see the earth "ringing down" in the data. It is possible to have a small SNR at a particular frequency of interest but the instruments DNR has to be much higher. Here the display has about 220dB of range.

BTW I'm sort of kidding around gravitational physics and audio are not that related.
 

Attachments

  • ligo.jpg
    ligo.jpg
    91.5 KB · Views: 138

ElNino

Addicted to Fun and Learning
Joined
Sep 26, 2019
Messages
558
Likes
727
Can you please explain in greater detail, without math. Thanks.

That's harder to do than it sounds. You might be able to get an intuitive understanding by looking at some pictures. This is the frequency response of an ideal bandlimited filter, referred to as a sinc filter: https://en.wikipedia.org/wiki/Sinc_filter#/media/File:Rectangular_function.svg It's kind of intuitive: you want to keep everything in one area of the spectrum and discard the rest. Sampling any signal does exactly this behind the scenes -- we're keeping a certain amount of information and discarding the rest (because it's a sampling; we're not storing the continuous signal).

Now, what if we send an "impulse" through that filter? An impulse is a quick sound pulse for an infinitesimally short period of time, like a really quick perfectly damped drum hit (there are no impulses in the real world because of the physics of air and materials and microphones, but we're dealing with mathematical models here). Here's the actual signal that comes out of that filter: https://en.wikipedia.org/wiki/Sinc_filter#/media/File:Sinc_function_(normalized).svg That's a little odd on first glance, right? There's a big lobe that represents the impulse, but then what are the waves before and after the impulse? Those weren't there before. Where did they come from? They're a mathematical artifact of the sinc filter/sampling process itself, referred to as pre- and post-ringing artifacts.

This is a perfect reconstruction of what we've sampled, in terms of sampling theory. In the real world, if we're trying to represent a percussion instrument like a drum, the waves before the impulse are not a perfect reconstruction. It's a sound before the drum was actually struck. We can reduce those by sacrificing the accuracy of our reconstruction in either frequency or in phase, but it involves trade-offs. (Note: I'm saying nothing about whether those artifacts are audible or not. Just talking about math here.)
 

dc655321

Major Contributor
Joined
Mar 4, 2018
Messages
1,597
Likes
2,237
It's important IMHO not to characterize Shannon's sampling theory in a misleading way.
If you want to preserve frequency response and phase up to fs/2, you get pre-ringing in the time domain that was not present in the original signal upon reconstruction. If you want to avoid this, you have to sacrifice either frequency response or phase response. The sampling theorem is not a free lunch.

Addendum to the avoidance of misleading characterization:
the "pre-ringing in the time domain" occurs at the corner frequency of the filter.
For a well designed reconstruction filter, the dreaded ringing is ultrasonic. Use a signal from a decent recording (not test signals) through such a filter and the dreaded ringing is both ultrasonic and at an inaudible level anyway.

So, yes, no free lunch, imperfect translation from math to reality, etc. But, the result of that neat mathematical result can be engineered to be practically perfect.
 

Fluffy

Addicted to Fun and Learning
Joined
Sep 14, 2019
Messages
856
Likes
1,427
@ElNino That's a pretty nice explanation, I'll give you that. But your little note about audibility is really the main issue here. The whole problem began when we limited the bandwidth, and we did that because we think that frequencies outside that bandwidth are inaudible. So the bottom line is not the math, but what we can practically hear. Any artifact that resulted from applying the sampling theorem is a non-issue if it's inaudible.

Talking about theory and math can be fun, but when it comes to the cost and effort we put into our sound recreation systems, it's just more beneficial to acknowledge what's important in practicality. I believe that one of the main fallacies of the audiophile pursuit is to think that our ears are a perfect sensing device that can perceive any change or artifact regardless of it's magnitude. And this is simply not true, there are limits to human perception. Every serious audio enthusiast that has practical economic spending limits should discover his own perceptual limits, so he can spend his money more wisely.
 

ElNino

Addicted to Fun and Learning
Joined
Sep 26, 2019
Messages
558
Likes
727
Addendum to the avoidance of misleading characterization:
the "pre-ringing in the time domain" occurs at the corner frequency of the filter.
For a well designed reconstruction filter, the dreaded ringing is ultrasonic.

No -- it isn't ultrasonic. I don't understand why this misconception persists; perhaps some people are confusing noise shaping with ringing. Totally different concepts.
 

scott wurcer

Major Contributor
Audio Luminary
Technical Expert
Joined
Apr 24, 2019
Messages
1,501
Likes
2,824
Now, what if we send an "impulse" through that filter? An impulse is a quick sound pulse for an infinitesimally short period of time, like a really quick perfectly damped drum hit (there are no impulses in the real world because of the physics of air and materials and microphones, but we're dealing with mathematical models here). Here's the actual signal that comes out of that filter:

This is a perfect reconstruction of what we've sampled, in terms of sampling theory. In the real world, if we're trying to represent a percussion instrument like a drum, the waves before the impulse are not a perfect reconstruction.

Do you see the contradiction here? I have seen no credible evidence of this issue being significant in music captured with real hardware i.e. a minimum phase brickwall filter. Saying things like the Fourier integrals are defined from plus to minus infinity in time so they can't get the exact answer serves little purpose practically. Limiting the problem to say we want answers to the level of 24 bit dithered data constrains the issue and it is possible. With effort 24/96 system can be designed to capture 20kHz audio with some margin to -120dB error bars, the theory is only concerned with unconstrained limits.

BTW Fluffy is not talking (I assume) about noise shaping, the Gibb's effect is at fs/2 which is ultrasonic one would hope.
 

RayDunzl

Grand Contributor
Central Scrutinizer
Joined
Mar 9, 2016
Messages
13,256
Likes
17,247
Location
Riverview FL
I digitally measured a digitally sourced analog square wave once... taken from the preamp output via 25 feet of cheap cable into the PC...

Being less concerned with the ultrasonics lost from a 15kHz square, I looked at a 10Hz square, instead.

There were more harmonics actually present than I might have predicted.

Looking back at it, I have to marvel at how how such detail can emerge from the signal.

Here is the prior discussion - https://www.audiosciencereview.com/forum/index.php?threads/an-unexpected-measurement.628/

A portion of the measured spectrum, zoomed in, still showing the harmonics - spaced 20 Hz apart:

1571341579501.png


The hair at the top is that portion of the harmonic series, the dark below the noise floor of my noisy measurement.
 
Last edited:

ElNino

Addicted to Fun and Learning
Joined
Sep 26, 2019
Messages
558
Likes
727
@ElNino That's a pretty nice explanation, I'll give you that. But your little note about audibility is really the main issue here. The whole problem began when we limited the bandwidth, and we did that because we think that frequencies outside that bandwidth are inaudible. So the bottom line is not the math, but what we can practically hear. Any artifact that resulted from applying the sampling theorem is a non-issue if it's inaudible.

Yes, I'm definitely not going to wade into a debate about whether any of this is audible. I do think the math is interesting out of its own sake though, and you'd be surprised how many undergraduates misunderstand the sampling theorem's consequences.

Talking about theory and math can be fun, but when it comes to the cost and effort we put into our sound recreation systems, it's just more beneficial to acknowledge what's important in practicality. I believe that one of the main fallacies of the audiophile pursuit is to think that our ears are a perfect sensing device that can perceive any change or artifact regardless of it's magnitude. And this is simply not true, there are limits to human perception. Every serious audio enthusiast that has practical economic spending limits should discover his own perceptual limits, so he can spend his money more wisely.

I agree with you, but as a bit of a DSP geek, part of the fun in experimenting with our sound systems is understanding what is going on. In my own system I use a custom reconstruction filter similar to what Archimago describes in his article on the "goldilocks filter". Very close but not quite linear phase. Is it audible? I dunno, but I enjoy the challenge of getting as close as possible to what I see as optimal with what's available.
 

ElNino

Addicted to Fun and Learning
Joined
Sep 26, 2019
Messages
558
Likes
727
Do you see the contradiction here?

There is no contradiction. Time domain artifacts stem from the combination of the symmetry of the sinc function and fs/2 being too close to the highest frequency we want to reconstruct accurately, not from the original signal being bandlimited prior to sampling.

With effort 24/96 system can be designed to capture 20kHz audio with some margin to -120dB error bars, the theory is only concerned with unconstrained limits.

We agree there. If you have a little extra leeway when sampling, reconstruction filtering is easy to do with no real tradeoffs. Sample at 96kHz, use a reconstruction filter with a corner at fs/4 rather than fs/2, life is easy. At 44.1kHz, if you want to preserve signals up to 20kHz and have a stopband at fs/2, you have to make a compromise somewhere.
 

dc655321

Major Contributor
Joined
Mar 4, 2018
Messages
1,597
Likes
2,237
No -- it isn't ultrasonic. I don't understand why this misconception persists; perhaps some people are confusing noise shaping with ringing. Totally different concepts.

Not disputing that I may be confused about some things - happens all the time - but not about noise shaping here, so can you explain at what frequency(ies) the "pre-ringing" occurs or where I am wrong about this?
 

scott wurcer

Major Contributor
Audio Luminary
Technical Expert
Joined
Apr 24, 2019
Messages
1,501
Likes
2,824
There is no contradiction. Time domain artifacts stem from the combination of the symmetry of the sinc function and fs/2 being too close to the highest frequency we want to reconstruct accurately, not from the original signal being bandlimited prior to sampling.

My point was actually look at a mic feed from a drum kit nothing even remotely like impulses (considering the BW of interest) even with cymbals.
 

Blumlein 88

Grand Contributor
Forum Donor
Joined
Feb 23, 2016
Messages
20,909
Likes
37,973
1571346043969.png


176 khz recording of cymbal hit very hard once with drum stick. Notice how it starts at low level and builds. That is because it takes a finite time for the energy to travel across the metal of the cymbal, reflect from the edge, and build to a resonance at higher level. So even hard struck cymbals are NOT like a Dirac pulse thru the ADC/DAC.

An Earthworks wide bandwidth microphone was used for the recording.
 

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,709
Location
Hampshire
It's important IMHO not to characterize Shannon's sampling theory in a misleading way. Shannon's sampling theory tells us that we can perfectly reconstruct an input signal that has been bandlimited by a perfect sinc filter by sampling at 2x the bandwidth.
The sampling theorem doesn't care how/why the signal is band-limited. A filter is only required if the bandwidth is not inherently limited to less than half the sample rate.

For real signals, which are not symmetric in time, this means that you cannot perfectly reconstruct signals up to fs/2. If you want to preserve frequency response and phase up to fs/2, you get pre-ringing in the time domain that was not present in the original signal upon reconstruction. If you want to avoid this, you have to sacrifice either frequency response or phase response. The sampling theorem is not a free lunch.
The sampling theorem allows reconstruction of frequencies lower than, but not including, half the sample rate. In practice, the reconstruction filter must have a finite transition band, although we can get arbitrarily close to the theoretical limit by making the filter sufficiently long. Even within this transition band, a linear phase filter has perfect phase response.
 

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,709
Location
Hampshire
No -- it isn't ultrasonic. I don't understand why this misconception persists; perhaps some people are confusing noise shaping with ringing. Totally different concepts.
The so-called ringing of a lowpass filter occurs at the corner frequency. In sampling and reconstruction this is typically at or slightly below the Nyquist frequency. For CD quality or better audio, this is above 20 kHz, i.e. ultrasonic.
 

Julf

Major Contributor
Forum Donor
Joined
Mar 1, 2016
Messages
3,053
Likes
4,071
Location
Amsterdam, The Netherlands

scott wurcer

Major Contributor
Audio Luminary
Technical Expert
Joined
Apr 24, 2019
Messages
1,501
Likes
2,824
An Earthworks wide bandwidth microphone was used for the recording.

This is my recreation of Earthworks spark discharge calibration for a very good 21mm electret microphone with fairly flat to >20k response. This is essentially a shock wave which no ordinary percussion instrument could produce. The math is a little complex, if anyone wants a reference to the exact shape you can ask it is not of general interest. The point is (virtually) no pre-ringing at 24/48k
 

Attachments

  • sparkFile.jpg
    sparkFile.jpg
    150.4 KB · Views: 175

BDWoody

Chief Cat Herder
Moderator
Forum Donor
Joined
Jan 9, 2019
Messages
7,109
Likes
23,719
Location
Mid-Atlantic, USA. (Maryland)
It is. I don't understand why this misconception persists.
Did you stomp your foot as well to provide the full effect? The foot stomp is everything...
 
Top Bottom