2
\$\begingroup\$

I ask this question just because I'm curious to find out.

As far as I understand, the Nyquist theorem says that the sampling frequency must be at least twice the bandwidth of the signal to be sampled. So, if we want to sample a signal with a sample rate that is too low for its bandwidth, we have to low pass filter the signal prior to sampling to avoid aliasing. Or am I wrong?

My laptop has an integrated sound card. In Audacity I can select any arbitrary sample frequency. Does that mean, that my sound card contains an adjustable low pass filter at the input to filter the signal to the selected sampling rate?

How is such a variable filter designed in an integrated circuit?

Thank you!

\$\endgroup\$
  • \$\begingroup\$ I do not know the answer to your question. A continuously variable low-pass filter might be kind of hard to implement, but it could have several discrete settings for the low-pass. It is also possible that either the sound card or audacity uses digital techniques. In other words, the actual sample rate is always the same, and low-pass is always the same, but data are re-sampled at another rate either in the card or in audacity. Re-sampling at multiples is easy. Resampling at arbitrary rates is possible but computation intensive. \$\endgroup\$ – mkeith Nov 7 '15 at 17:56
  • \$\begingroup\$ You do not tend to see nyquist aliasing from the actual sampling rate, as in modern sigma-delta designs that is a substantial multiple of rate at which samples are output from the converter. However, if you play with strong super-audible signals, you may find that some of the many digital processing steps post conversion (especially operating system- and application- level sample rate converters) have susceptibilities which can cause aliasing. \$\endgroup\$ – Chris Stratton Nov 7 '15 at 18:51
2
\$\begingroup\$

It's always wrong to generalise ;-) but I think it's safe to say that all PC sound inputs today and for the past few years use sigma delta converters. These sample at a very high rate, and then decimate to the required lower rates like 48k, 44.1k, in DSP in the sound chip.

The fact that the actual sampling rate is very high means that a trivial low pass filter at the input will suffice to pass the audio band while rejecting above half the sampling frequency.

When the rate is dropped to the final rate, the use of digital filters means that a very sharp filtering function can be achieved, DC to 20kHz passband for 44.1kHz sample rate is straightforward.

\$\endgroup\$
0
\$\begingroup\$

It probably means that audacity can interpolate (or decimate) the bog-standard 44.1kHz soundcard sample rate to another rate. Wavelab (another wave editing tool) can do this because I use it this way sometimes.

How is such a variable filter designed in an integrated circuit?

Probably the easiest way is to use a high order switched capacitor filter - this can retain the passband and roll-off rate of the desired bandwidth and it's controlled by a variable frequency. I don't think soundcards employ such stuff because there is a big cost impact on the product and why should they - they are sound cards and will probably have a fixed anti-alias filter at or about 20 kHz and anything above that (for a cheap card) is pointless because nobody can hear it. Sampling at lower rates is easiest acheived using a wave editors tools to capture it then decimate.

Anyway Linear tech produce this nice filter that would be OK for a variable cut-off low pass filter (stereo): -

enter image description here

Or maybe this single channel one: -

enter image description here enter image description here

\$\endgroup\$
  • \$\begingroup\$ In practice, the anti-aliasing filter on a soundcard is folded into the Sigma-Delta ADC which effectively samples at a substantial multiple of the output sample rate. After that it is all DSP. In contrast, the anti-aliasing task to roll off between the desired passband and half a 44.1 KHz sampling rate (when sampling was still actually done at the desired output rate) yielded notoriously distorted results. \$\endgroup\$ – Chris Stratton Nov 7 '15 at 18:07
  • \$\begingroup\$ 48 kHz is also quite commonly available. That's because it's a integer multiple of 8 and 16 kHz, sample rates that have been widely used historically. \$\endgroup\$ – MSalters Nov 7 '15 at 19:48
  • \$\begingroup\$ @MSalters very true but for audio there is no reason to "shift" the analogue anti-alias filter if it works at 44.1kSps \$\endgroup\$ – Andy aka Nov 7 '15 at 20:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.