# Does a sound card low pass filter input?

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!

• 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. Nov 7, 2015 at 17:56
• 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. Nov 7, 2015 at 18:51

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.

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): -

Or maybe this single channel one: -

• 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. Nov 7, 2015 at 18:07
• 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. Nov 7, 2015 at 19:48
• @MSalters very true but for audio there is no reason to "shift" the analogue anti-alias filter if it works at 44.1kSps Nov 7, 2015 at 20:50