AM audio muffled with BW >= 10972 Hz [fixed in v1.222]
Hi all - with an AM broadcast station, if you set the passband width in the URL to 10971 Hz or lower it sounds right, but if you choose a bandwidth between 10972 and 12000 Hz it sounds quite a bit narrower. I think this is a recent bug. Currently running 1.218 with four WF channels.
Comments
The problem was the AM post-detector "clean up" FIR filter. This filter was inherited from the CuteSDR code. The problem is that when the filter bandwidth approaches the sample rate (12 kHz) bad things happen during the filter tap construction due to the Nyquist limit and the filter not having a small transition band (which would cause it to ring).
I couldn't hear that the filter was doing much anyway so I just removed it. There is other LPF filtering code in the browser (written in Javascript) to handle artifacts from the interpolation from 12 kHz to the PCs audio sample rate of (usually) 44.1 kHz. And also artifacts when decompression is required. Because the sample rate is larger than 12 kHz the LPF doesn't get into Nyquist trouble.
Attachments:
https://forum.kiwisdr.com/uploads/Uploader/b8/4030d38aad332a919102a673f464ae.png
For some reason when the AM post-detector FIR filter was enabled it "normalized" the response inside the filter passband even for large passband values. I don't understand why that happens. Maybe some DSP expert can explain it to us. Anyway, I looked a little closer at the original problem that caused me to remove the FIR filter in the last update (passbands over 10971 Hz suddenly get much narrower filter responses). I found a workaround, so now I'll just re-enable the FIR filter and we should be good.
Eventually the CIC problem needs to be fixed. You can really see it in the spectrum display with IQ mode and >= 10 kHz passband. This is probably negatively impacting things like DRM reception.
Cheers
PK ;-)