Understanding the low-pass/high-pass filter in the tutorial

Following the examples provided in the tutorials, I’m trying to make sense of the low-pass and high-pass filters. I mean, they are very simple filters. And I wasn’t expecting to ask such questions myself, But looking at the results, it makes me wonder if I’m missing something.

The provided example filter is like this:

filter_desc: aresample=8000,highpass=f=200,lowpass=f=1000,aformat=sample_fmts=fltp

Which means only frequencies between 200Hz up to 1000Hz shall pass and the rest should be filtered out. But looking at the spectrogram:

image

There are still information lower and 200Hz as well as above 1000Hz. What am I missing here?

For clarification, this is what I was expecting to see:

Your desired result would correspond to an “ideal” box filter, which has a sinc impulse response in the time domain. I don’t know which filters are used in your application, but note that each one has a different response. E.g. take a look at the butterworth filter response:

which shows the gain in dB.
I would also assume that you are plotting the power spectral density in the frequency domain and thus the values and color mapping also corresponds to a dB scale?
If so, the filtering looks reasonable.

1 Like