WAV to FLAC File Conversion

Keeping this short is hard. But the key concept is actually simple.

Start with what’s absolutely the same about PCM and DSD: what you’re given is a series of relative amplitude values for a waveform at regular time intervals. The waveform by definition is not allowed to have any frequency components greater than half of the sampling rate.

PCM makes more intuitive sense because the visual plot of those points “looks like” the audio waveform we expect to end up listening to. But the way the points translate to sound is essentially the same for DSD… it’s just that the set of points given contains not just the audio we want to hear but also a massive amount of random-seeming ultrasonic noise. We can’t “see” the audio in the points like we can in PCM.

Playback of both types of encoding follows the same overall process (ignoring all the permutations of oversampling and multi-bit SDM etc etc because they still boil down to this):

  1. For each sample, generate an output voltage of the appropriate level at the appropriate time
  2. Pass the signal generated in this way through an analog low-pass filter

You see with PCM that the samples occur much less often but individually have a voltage which is much closer to the expected output voltage at that time. DSD has samples at least 64x more often than CD audio but the only voltages it knows are “fully positive” and “fully negative”.

The trick with DSD is that the samples have been calculated to produce a specific effect after the filter. Because the sampling rate is so high compared to the frequencies we are interested in post-filter, each sample has the effect of “nudging” the output closer to where we want it. They literally get averaged out. So you don’t look at the current sample of DSD to understand what the audio signal level should be right now. You look at the average value of the past 64 or more. (That’s an ELI5 version, not an actual technical instruction.)

And as I said in the other thread DSD vs PCM Hi Rez - your opinion? - #11 by dvorak the primary reason for the difference in sound quality is the freedom to use much gentler filters which do way less damage to the audio that they let through.

2 Likes