Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Converting DSD64 files to FLAC (Read 11463 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Converting DSD64 files to FLAC

I have a couple of DFF files I have been playing with.  I wanted to find an easy way to convert them to FLAC or some other lossless format.  I installed foo_input_dsdiff and fired up foobar2000, which happily played the file.  I used the convert option of foobar2000 to make a FLAC.

When I look at the properties of the DFF file it tells me:

Sample Rare:  2822400 Hz
Bits per sample:  24

When I look at the converted FLAC it shows:

Sample rate:  44100 Hz
Bits per sample:  24

Is there a reason why FLAC chose to use a sample rate of 44100 vs something higher?

I will aware I am not going to hear any kind of noticeable difference between 44100 and a higher sample rate.  I'm just curious why the converter chose what it did.

Converting DSD64 files to FLAC

Reply #1
I figured it out.  It's a setting in the dsdiff decoder.  You can pick the sample rate.  When I cranked it up, it made a much larger file with a higher sample rate.

Converting DSD64 files to FLAC

Reply #2
I've never done it with Foobar but with XLD and presumably the process will be the same. Essentially it needs to downsample from 2822400 to something reasonable. Considering 44100 is exactly 1/64th of 2822400 it means it can be downsampled without any rounding issues. For instance, if you wanted to downsample it to 48000 it would mean it would have to "divide" it by 58.8 which could produce rounding errors.
Every night with my star friends / We eat caviar and drink champagne
Sniffing in the VIP area / We talk about Frank Sinatra
Do you know Frank Sinatra? / He's dead

Converting DSD64 files to FLAC

Reply #3
Considering 44100 is exactly 1/64th of 2822400 it means it can be downsampled without any rounding issues. For instance, if you wanted to downsample it to 48000 it would mean it would have to "divide" it by 58.8 which could produce rounding errors.


There are roundings errors when doing any calculation...

Converting DSD64 files to FLAC

Reply #4
Sample Rare:  2822400 Hz
Bits per sample:  24
It really is 24bit and 2.8Mhz? I thought the point of DSD was to use PWM and store 1 bit data at high sample rates, and not 24 bit data. Why even use PWM at 24bit resolution?

There are roundings errors when doing any calculation...
What gives you that idea?  There are uncountable many occurances where your statement is true, but also uncountable many where it is wrong.
It's only audiophile if it's inconvenient.

Converting DSD64 files to FLAC

Reply #5
There are roundings errors when doing any calculation...
What gives you that idea?  There are uncountable many occurances where your statement is true, but also uncountable many where it is wrong.


Fine, if you want to be pedantic, doing floating point and most non-trivial fixed point operations, such as the ones we are discussing.

Converting DSD64 files to FLAC

Reply #6
There are roundings errors when doing any calculation...
What gives you that idea?  There are uncountable many occurances where your statement is true, but also uncountable many where it is wrong.


Fine, if you want to be pedantic, doing floating point and most non-trivial fixed point operations, such as the ones we are discussing.
When using 32 bit, base 2 floats (single-precision float), 4. / 2. = 2. has rounding errors? 2822400. / 64. = 44100. has rounding errors? I genuinely wonder, because from my understanding of floating point arithmetic those calculations should result in no rounding error at all. Of course, the resampler employed probably doesn't just drop 63 samples of every 64 samples.

It's only audiophile if it's inconvenient.

Converting DSD64 files to FLAC

Reply #7
DSD64 is 1bit, so probably the "24 bits" is information from the decoder (or a way to tell foobar the output bit depth, not the stream's bit depth).

Converting DSD64 files to FLAC

Reply #8
When using 32 bit, base 2 floats (single-precision float), 4. / 2. = 2. has rounding errors? 2822400. / 64. = 44100. has rounding errors?


No, division by two is exact because the exponent in a floating point number is always a power of two, hence division by a power of two is just a decrement of the exponent value. 

Of course, the resampler employed probably doesn't just drop 63 samples of every 64 samples.


Not probably.  Decimating a 1 bit signal would not work very well, so an interpolator must be used. This is where rounding error is introduced.

Converting DSD64 files to FLAC

Reply #9
I figured it out.  It's a setting in the dsdiff decoder.  You can pick the sample rate.  When I cranked it up, it made a much larger file with a higher sample rate.


Could you tell me how to access that setting?

TIA