Low-Pass Recording Filter Control

I’m running Audacity v2.0.6 as compiled by the Debian project for Jessie (aka, Debian Testing).

I’m doing some sound research that requires visibility into near-ultrasonic frequencies (15 kHz to 50 kHz). When I record some sounds through the laptop micrphone with Audacity, I found that regardless of the sample rate, all frequencies above 20 kHz are strongly filtered out. I understand it is customary to do that as part of a normal audio filter chain, but in my case I really do need the higher frequencies. It’s actually OK for me if the recording ends up with +80dB/dec of shaped noise, or -40 dB/dec of reduced sensitivity above the hardware’s cutoff.

Is this a function of the Alsa driver, my hardware, or Audacity itself? If Audacity or Alsa are doing it, can I control it in any way?

My guess would be hardware. I’m quite surprised that you get up to 20 kHz with a laptop mic. I’d expect not much more than noise above about 18 kHz.

The sounds of rubbing fingers or saying “psssss” both have plenty of high-frequency components for testing purposes. Nevertheless, there is a plainly visible brick wall in the spectrum right at 20 kHz, even when sampling at 192 kHz.

Do you know that Audacity isn’t performing any filtering itself? Under Preferences-> Quality there are options for “realtime conversion” and “high-quality conversion” sample rate converters. Is Audacity performing oversampling itself, or is it requesting the Alsa driver to perform higher-rate sampling?

Audacity does not filter the audio during recording. If you want to filter the audio you must apply a filter effect - Audacity cannot do that automatically.

Those setting have no effect on recording. They only apply if the sample rate of the track is different to the “project rate” (as shown in the lower left corner of the main Audacity window, and they only apply during playback, mixing down, or rendering one track to another track. They have no effect on the data during recording.

Audacity requests data from the sound system at the sample rate of the project - by default this is the “default sample rate” shown in “Preferences > Quality”.

Why do you think that your hardware can operate above 20 kHz audio frequency? It would appear that it can’t (which is normal for most sound cards).