Hacker News new | past | comments | ask | show | jobs | submit login

Because of your comment, I spent some time reading about DSP. https://www.analog.com/en/resources/technical-books/scientis...

Chapter 14 demonstrates how digital filters can achieve perfect linear phase accuracy. Chapter 17 demonstrates how digital filters can also compensate for the phase inaccuracy of physical filters. Blew my mind when I read that. I can't thank you enough for spurring me into reading about this.

The book calls "pre-ringing" ripple and overshoot. Ripple happens on both ends, the ringing before, and the delayed peak after. (See the step response examples in Chapter 14, page 267.) We also call it the Gibbs phenomenon, a necessary effect of a bandlimited Fourier series reconstructing a discontinuous waveform. Analog filters don't have ripple because of they exhibit exponential decay to a step function, necessarily a non-linear phase response. Symmetric ripple and overshoot in the filter step response demonstrates a linear phase response (Chapter 14, page 268). In fact, I would call the pre-ringing a desirable trait for dealing with audio: a reconstructed bandlimited phase-accurate signal will enter the ear in the same way as the original non-bandlimited signal (unless >20000 Hz actually matters). Additionally, we likely want a windowed sinc filter (Chapter 16), which deals with the 1/x ripple decay of the sinc function with acceptable stopband performance.

So, with all of that, I see how modern codec chips can achieve a nearly linear phase response in the 0-20000 Hz range, with -80 dB of aliasing noise at 20000 Hz, during both recording and playback.

For recording, these modern chips likely use a cheap physical low pass filter, followed by sampling at a high rate, followed by a digital filter, followed by downsampling. For playback, do the reverse: the chip likely uses upsampling, followed by a digital filter, followed by a delta-sigma circuit (or some other DAC), followed by a cheap physical low pass filter. Check out the block diagram of the ALC892. https://www.alldatasheet.com/html-pdf/1137676/REALTEK/ALC892...

Utter DSP victory.




Super thanks for the book rec, on first look seems to contain all the important things a DSP textbook needs. And it is free!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: