r/askscience • • Dec 23 '12

Engineering Similar to how computer monitors cannot display some colors, are there sounds that speakers cannot produce?

69 Upvotes

30 comments sorted by

View all comments

Show parent comment

3

u/sixteenlettername Dec 23 '12

As you said, the maximum frequency a digital signal can express is half of the sampling frequency, due to the Nyquist-Shannon sampling theorem. This frequency is called the Nyquist frequency.

Any attempt to introduce frequencies above the Nyquist frequency will result in aliasing. Therefore, when downsampling, a low-pass filter with a sharp cut-off around the new nyquist frequency will be used to remove any offending frequencies.

Often this won't impact on the fundamental frequencies of the tones (eg. the frequency of whichever key you're playing on a keyboard). But complex signals will usually contain harmonics - frequencies at integer multiples of the fundamental frequency (what you refer to as the 'subtle layers'). If you remove higher frequency harmonics (ie. you bandlimit the signal), you will modify the tone and remove some of the sparkle which results in a flatter tone. You can introduce the illusion of maintaining the high end by EQing or other techniques (as you've found) but it is of course not as good as keeping as many of the harmonics as possible.

People do use higher sample rates (eg. 96KHz) nowadays to maintain these harmonics (amongst other reasons).

1

u/scswift Dec 23 '12

It just doesn't make sense to me. I get that downsampling will remove frequencies above 11khz, but it doesn't sound like the complexity I hear in the original sound is comprised of tones above that frequency, and I just tried using EQ to remove all frequencies above 11khz and the result sounds totally different and better than what I get when I just downsample to 22khz. If nyquist's theorem were true, then after removing all those frequencies, converting to 22khz should lose no information, but it's losing a ton of information.

2

u/seventeenletters Dec 23 '12

If nyquist's theorem were false, digital communications and signal processing would not work.

1

u/scswift Dec 23 '12

I believe that, but what I am wondering is if the algorithms used to downsample the audio aren't destroying a lot of information. I mean sound forge has four levels of accuracy you can choose from, and an option to reduce aliasing. And there's a second separate downsampling filter which has a ton of additional options.

Clearly there is more to representing a signal that contains frequencies up to 11khz than just sampling it at 22khz, or else all these options would not be needed, and the resulting file would sound like what I get when I remove all the frequencies over 11khz.

1

u/Eruditass Dec 24 '12

In order to downsample correctly, you must use a anti-aliasing filter in order to prevent, well, aliasing. That is most likely what the accuracy options are. The downsampler may be using a filter that is cutting off frequencies early (attenuating some less than 11 KHz), not rolling off fast enough (adding aliased frequencies which mess with the sound), have some weird ripple in time or frequency domain, etc.

1

u/Eruditass Dec 24 '12 edited Dec 24 '12

Maintaining harmonics above 22 kHz is useless for nearly everyone. There is no need to sample at higher than 44 kHz for that.

Why they may sample at higher than 44 kHz is because it is much easier to design a filter with a less sharp cut off to get rid of ripple in frequency response and group delay, step response/ringing, as well as have a nice low stop band.