News for hackers. Stuff that matters.
Re:FLAC 1.4.0 released – added support for 32-bit audio by colejohnson66 on Wednesday September 14, 2022 @03:49PM (#32842423)
Nyquist-Shannon simply says that you need 2x the sample rate of the highest frequency to perfectly recreate something. So, to recreate a 20 kHz wave that was sampled at 16 bits, you'd need 40 kHz sample rate. Bump that up to 22.05 kHz (for anti-aliasing) and you get CD audio.

The bit depth, OTOH, is your signal-noise ratio (noise floor) when sampling/quantizing said audio. It's unrelated to Nyquist-Shannon. More bits gives you less noise when reproducing it. For CD audio, 16 bits was chosen to give an acceptable SNR of 96 dB.

Monty Montgomery (of xipf.org) has a nice YouTube video related to this: https://www.youtube.com/watch?v=cIQ9IXSUzuM

Re:FLAC 1.4.0 released – added support for 32-bit audio by Night_Thastus on Wednesday September 14, 2022 @03:54PM (#32842495)
Yes, you only need that many samples given you know a maximum frequency. But to actually perform the conversion from discrete samples to continuous wave takes infinitely many steps. The number a given DAC actually does varies. Some do hundreds, some thousands, a couple rare (very expensive) ones do 100k or more.

That's what I'm saying. Increase the number of samples in the audio itself, and the DAC can get closer to the original.

Re:FLAC 1.4.0 released – added support for 32-bit audio by colejohnson66 on Wednesday September 14, 2022 @03:57PM (#32842538)
Except it's not. The video shows that. In the real world, the DAC doesn't immediately jump from code N to N+1; it slides (the "slew rate" of the opamp). More bits just makes the difference between codes N and N+1 smaller; i.e. where it slides to is more accurate to the original. The "stair step" or "straight line" view you get from programs like Audacity is a lie.
Re:FLAC 1.4.0 released – added support for 32-bit audio by jrmcauliffe on Wednesday September 14, 2022 @04:18PM (#32842783)
A final low pass filter (tuned to remove anything above half the sample rate) allows the accurate reconstruction of the original analogue waveform from the sampled digital data. ( The vertical 'stair step' of sampled data is very high frequency information which gets removed, 'bending' the output back into it's original shape). The video linked above is well worth a watch.