WAV to FLAC File Conversion

For me, DSD just always sounded better than PCM… I know this is not necessarily true for every one or for every player, but all I cared about was what I heard. DSD can have more detail than (standard sample rates and sample widths of) PCM, it uses gentler filtering, it’s by definition linear (two points define a line). I heard it once at a demo at an AES (Audio Engineering Society) convention and was hooked.


Yes! For sure!
At the end of the day, what we hear is what counts.
I believe that DSD can sound better.
Just want to be able to logically explain why.

Thanks Ted.


Was reading somewhere about upsampling/converting to DSD… like using HQPlayer or within Roon or whatever.

The thinking was that if you had a Delta-Sigma DAC, yep, go for DSD. But if you had an R2R DAC, keeping it PCM was a better bet.

Is there anything to that?

1 Like

As a generalization that’s probably correct, but it definitely depends on the DACs in question and your preferences. Like generalizations about say, this or that cable being better for certain kinds of music, YMMV.


FWIW, with 24bit 192k files from Octave Records pitted against DSD 64, I use to prefer the DSD files more for their slightly smoother presentation. But I have changed maybe due to change in equipment or music. Now I seem to have a preference to 192k PCM to DSD 64 because PCM has a slightly sharper, meaning more defined outer edges, and a bit more presence in the sound.
Of corse with the files from HDTT, there is no doubt I choose DSD256 over 24bit 352 FLAC. DSD 256 just has more bloom and richness and liveness over all the other formats.

1 Like

No, you’re not wrong to point out that DSD and PCM are more similar than most people realise. But it’s not a matter of evolution, and the image format analogy doesn’t really work. What’s happening is that engineers are approaching the same problem with the same set of rules but from different angles.

Ultimately, what we want is a digital audio encoding system which gives us high signal-to-noise ratio in the human-audible frequency band. Let’s say ~100dB of SNR between 0 and 20kHz.

The rules of the game are that your system must not be given input higher than half of your sampling frequency, it must not output any signal higher than half of your sampling frequency, and you get an average of 6dB of SNR across your entire bandwidth (ie from 0 to half of your sampling frequency) for each bit of resolution in your samples.

The “noise” part of the SNR here is specifically “quantisation noise”, ie the average inaccuracy of the digital sample value compared to the true analog signal level at that moment. More bits means more precision means less error means less quantisation noise means higher SNR.

Back in the late 70’s digital tech was much more limited than it is today. The engineers designing Compact Disc technology chose to keep the sampling frequency as low as possible to suit the practical/economical constraints of the time. So sampling at 44.1kHz lets you work with 0-22.05kHz audio frequencies – just enough in theory to hit our 20kHz target and still have a tiny bit of room for filter roll-off. That filter will be tight though! They also selected 16 bit sampling depth for 96dB of SNR. Job done. “Perfect Sound Forever™”

But dang it those vinyl heads all reckon that CD sounds harsh and lifeless. Maybe those filters are a bigger deal than we’d realised.

The SACD folks try a different approach some years later. Understanding what they did requires you to have a very basic understanding of SDM, and a helpful term related to SDM is “noise shaping”. Although using fewer bits per sample increases the quantisation noise overall, if you run at a higher sample rate it becomes possible to craft signals where the difference between the audio signal you want to encode and the nearest digital value is used to create noise only at ultrasonic frequencies. Take this to sufficient extremes – 1-bit 2.8224MHz sampling for example – and most of the noise due to quantisation error can be pushed well above 30kHz. You can then use a simple, gentle low-pass filter to let all your audio, and very little else, go through to your amplification.

To restate this a different way, DSD takes an analog audio input and calculates a pattern of ultrasonic noise to add on top, so as to produce a waveform that can be represented nearly perfectly in 1-bit encoding at multi-MHz sample rates. This calculated noise is part of the DSD signal, alongside your original audio. During playback we just convert the whole digital signal to analog and then gently filter out the ultrasonic part to leave us the original audio.

So you see, a 1-bit signal encoding follows the same basic rules as a 16 or 24-bit encoding. It’s just that for DSD we use tricks to make the 1-bit quantisation noise be noise we can easily get rid of.

A very similar thing is done on CD by the way! Just at a smaller scale. The final step of mastering is usually to downsample from 24-bit to 16-bit encoding and to avoid potentially-audible quantisation error from the pattern of the least-significant bit changing, they’ll use one of several algorithms to flip that final bit and ensure the resulting noise sounds like very quiet high frequency hiss. It’s still in the audio band and can’t be filtered out, but it is still a kind of “noise shaping” so that the most critical audio signal bands contain as little noise as possible.


But to drive the point home easily, and clearly, in the chair I sit in, I am never even curious as to format or bitrate. Who cares? It all sounds nice. That is your goal.

Guy who gets there cheapest, wins.


…ruining “Perfect Sound Forever™”!

But hey, thank you! Your explanation helps a lot!

Easy for you to say!
Apparently, you now own the company…

But hang on a second…
In your bio you claim, that you are a “cranky old fool” that still pays for music… who does that?!?
Take comfort in the fact that you are not alone.

So then, wouldn’t you want the “best sound” for your bucks?
That’s all I am looking for. Like I mentioned above. To be able to rationalize the higher price purchase so I can minimize my overall crankiness. :slight_smile:

1 Like

Am I correct in thinking that the quantisation noise (error?) is like the remainder when doing division?
Basically digital is only “whole” numbers and analog can be everything in between the whole numbers - infinite, at least in theory?

So that
2/2 = 1 a whole, round number.= digital.
2/3 = 0.6666666666666667 = analog.

When converting the analog signal to a digital signal, the remainder after the decimal place is the quantisation noise (error)?

Am I even close?

Yeah that sounds like you understand.

For audio we’re conceptually dealing with the range of -1 to 1. We divide that space into some number of equal-sized steps based on the number of bits we have. With a single bit we can only say “-1” or “1” and nothing in between. With 16 bits we have more than 65 thousand steps in between. But an analog signal has an (effectively) infinite number of values it could take. So the difference between the actual analog value and the nearest step value is the quantisation error.


My new DAC is, I believe, the world’s first 1.5 Bit DAC. Noise shaping was bettered with the extra half bit. I heard the creator of it explain why 1.5 Bit solves an issue with 1 Bit DACs, and several other improvements over multibit DACs. But it would take our Ted to make the most sense out of that. It sounds nice. It pushed the Tambaqui out the door. (Loaned to a friend)


1.5 bits is nice, you get a clean representation for 0 and three quantization choices instead of two can help with the sigma delta modulator. But it also gets rid of the perfect linearity of just two points. I did one and a half bits in the final release of software for the DS and DS Jr. Most people liked it, but not all.


How can I get that code running on my Jr.!!!

I was wrong, it was the last two releases for the DS and the DS Jr. Both Sunlight and Windom are 1.5 bits.


So I actually have TWO 1.5 bit DACs! Amusing.
Thank you Mr. Smith!!!

Apparently not. :laughing: Good old Ted. Light years ahead of everyone else in pure DAC knowledge.


I was wondering whether this is correct for PDM but not for PCM. As I understand it, a PCM frame represents an absolute value of magnitude, ie. the magnitude value represented by a frame is independent of its preceding frame(s). In the PDM implementation most relevant for audio, a „1“ means that the analogue signal amplitude is higher than it was in the previous time step(s) while a „0“ means it‘s lower — which is in essence an relative representation of the analog signal in a digital form. Am I missing something?

Sort of. 1 means closer to the positive rail (positive maximum) and 0 (-1) means closer to the negative rail. They aren’t relative to the previous signal, they are relative to fixed values.

A sigma delta modulator for DSD uses feedback and will in a short time always be driven to the correct value (the time to do so being limited by the bandwidth of the low pass filter.)