Hacker News new | ask | show | jobs
by mlyle 582 days ago
Your comment is mutually contradictory-- what is it, a brick wall (impossible) analog filter or a more gentle rolloff as things fold over?

What you really do, these days, is you sample at a higher frequency; you can have an exceptionally gentle analog filter (which will help you make it linear, too). E.g. if you sample at 96KHz, you just need to roll to near zero by 75KHz. Then you can digitally downsample/decimate to 44.1KHz or 48KHz.

Also note for CD audio, it's more like 24KHz where you get worried, not 28KHz.

1 comments

You're mixing up the two filters. The pre-sample filter (before ADC) is defined to be a brickwall (of course impossible in practice, so in reality, it will have to start going off a bit before 20 kHz); the reconstruction filter (after DAC) has a roll-off.
I've not been talking about the reconstruction filter at all during any step of this discussion. Reading your comment more carefully, it seems you were trying to.

I'm saying that if you oversample, it's easier to get appropriate rejection from your pre-sampling filter and it's easier to make it appropriately flat as well.

E.g. sample at 384KHz; you need to reject stuff over 360KHz. You probably have negligible energy up there to begin with. A 3rd-order filter with -3dB at 30KHz might get the job done. It's pretty easy to make this flat in phase and amplitude up to 20KHz, and things like capacitor nonlinearity are much less of a concern.

In turn, filtering down to 20KHz and rejecting from 22050 and up is easy in the digital domain. 512 taps gets me a filter flat to 0.15dB up to 20KHz and >63dB rejection over 22KHz.

My point was, this is a little better at 48KHz, because we can choose to e.g. pass 21KHz and have a wider guard band (14% vs 10%). With 384 taps, numbers are more like flat to 0.1dB and -67dB, benefitting both from the wider guard band and 48KHz being a factor of 384KHz.

Sure, you can implement the pre-sampling filter as a multistage filter, of which some of the stages are digital, if you wish. (I don't know where you get “rejecting from 22050 and up” from, though. For the pre-sample filter, you should reject from 20000 and up, and for the reconstruction filter, you should either reject from 24100 and up or 28000 and up, depending on whether you ended up sampling in 44.1 or 48.) But I don't think your argument makes much sense; if you're already in a domain where you have enough resources to sample at 384 kHz and run a 384-tap FIR filter over it, then surely you're high-end enough that you can't say “nah, who cares about the most common sample rate out there”.
When sampling:

You should pass all below 20KHz, as flat as possible. You definitely should stop 24.1KHz and up. How bad 22.05KHz to 24.1KHz is, is debatable.

> then surely you're high-end enough that you can't say “nah, who cares about the most common sample rate out there”.

I didn't say "don't support 44.1KHz" -- I'm saying there's good reasons to prefer 48KHz.

All being equal (same number of filter taps, etc)-- just a slightly higher sample rate offers a lot more performance because you can get a bit more frequency response and a lot flatter passband.

The Moog Minimoog filter goes beyond 20Khz. So even if you gently roll off at 20Khz, you’re going to miss overtones etc.
You can't hear ultrasound. For audio, the only question about 20+ kHz frequencies is how to get rid of them in the cheapest+best way.