HydrogenAudio

Hosted Forums => foobar2000 => General - (fb2k) => Topic started by: flaminio on 2024-04-27 23:21:36

Title: Play/Convert DSD Stream Files (.dsf)?
Post by: flaminio on 2024-04-27 23:21:36
Howdy -- does there exist any foobar2000 extension to play and ideally convert DSD Stream Files (.dsf)?

Thanks in advance for your wisdom.
Title: Re: Play/Convert DSD Stream Files (.dsf)?
Post by: Gus. on 2024-04-28 01:33:39
For playback https://sourceforge.net/projects/sacddecoder/
foo_input_sacd
foo_out_asio+dsd
Optional: foo_dsd_converter/transcoder/processor

I'm not familiar with DSD, check this guide https://diyaudioheaven.wordpress.com/digital/pc-software/foobar-2000-for-dummies-part-3-new-experimental-sacd-plugin-v-0-9-x/
Title: Re: Play/Convert DSD Stream Files (.dsf)?
Post by: flaminio on 2024-04-28 02:02:11
Thanks! That worked great!
Title: Re: Play/Convert DSD Stream Files (.dsf)?
Post by: Gus. on 2024-04-28 02:03:56
Welcome, glad it worked :)
Title: Re: Play/Convert DSD Stream Files (.dsf)?
Post by: Porcus on 2024-04-28 12:31:15
and ideally convert DSD Stream Files (.dsf)?

Convert, into what? Different purposes call for different tools:
* If it is only to reduce size, then WavPack can  - losslessly - compress DSD except those that are already compressed (even harder) with DST. Then you cannot use fb2k, you must use official WavPack. (You can play the .wv files back in fb2k!)
* If you want to convert into PCM (because, say, that is what your device can play) then beware that DSD decoding should have a low-pass filter to kill that noise that comes with the format.
* If it is to convert into lossy, then (I think!) that is all fine - those will kill the unwanted ultrasonic noise for you.
Title: Re: Play/Convert DSD Stream Files (.dsf)?
Post by: flaminio on 2024-04-28 16:10:40
Convert, into what?

FLAC, for the most part. fb2k says it can't do this losslessly, but I ran the conversion and it sounds fine.
Title: Re: Play/Convert DSD Stream Files (.dsf)?
Post by: Defender on 2024-04-28 18:00:48
How do I extract DSF files from an SACD iso within foobar?

If I use an external program to extract DSF that works just fine, but I cannot get extraction working from within foobar.

I installed  foo_dsd_converter 0.1.9 and it is available on the context menu, but if I start it it just opens a black window and does nothing.
It also does not output anything to the console.log.

Any ideas?
Title: Re: Play/Convert DSD Stream Files (.dsf)?
Post by: Porcus on 2024-04-28 23:35:19
Convert, into what?

FLAC, for the most part. fb2k says it can't do this losslessly, but I ran the conversion and it sounds fine.
Yeah, your target resolution is already more than your ears can hear - should be! - but beware that DSD could at worst plague your amplifier and tweeter with high-frequency noise at volumes that could induce distortion.
foobar2000 can resample on-the-fly, so it could get rid of it ... https://archimago.blogspot.com/2015/04/analysis-dsd-to-pcm-2015-foobar-sacd.html

Note, FLAC compresses linear PCM. DSD is pulse-density modulation (https://en.wikipedia.org/wiki/Pulse-density_modulation), it works like an old-fashioned light dimmer ("subtracted the half": half-way dimmed corresponds to zero).
It is not possible to convert losslessly between the two. The reason why WavPack can do it, is that it has a special compressor for DSD.
But both CD quality PCM and SACD-quality DSD are "enough", so it is possible to convert back and forth - both operations lossy - without your ears noticing.

(Notes for nitpickers:
* "Not possible" to convert losslessly ... yeah sure you can think of PDM as PCM, but ...
* "without your ears noticing": Maybe if you put a computer at work doing the back-and-forth a sufficient number of times, it would be noticeable, but as long as you aren't actively trying to sabotage ...)
Title: Re: Play/Convert DSD Stream Files (.dsf)?
Post by: dewdude on 2024-04-29 01:22:44
There is one main thing to remember: PCM and DSD do not store audio the same way.

PCM stores it's audio using samples that contain a number of bits that correspond directly to the amplitude of that sample. So you know a sample of 0XFF will be full-scale amplitude and 0x00 will be full scale the oppostite direction. Samples can be signed...yadda yadda...but with PCM you have bits that represent a sample level.

DSD doesn't have that. It's sample is a bit. DSD doesn't even store the position of the waveform....it stores the delta of the wave....and it does this by flipping a saw-tooth oscillator very very rapidly then low-pass filtering it. This is also called Delta-Sigma Modulation.

You've probably dealt with it without realizing it. Most DACs use the "oversampling" technique; which uses delta-sigma internally at higher rates. CD players in the 80s and 90s used oversampling like crazy. It should also be noted that when digitizing signals, they usually start out as delta-sigma before being decimated to PCM.

The "lossy" aspect is talking about bit-perfection through the chain...not perceptual quality. You can't decimate DSD to PCM anything and then back to DSD and get the same bits back. You'll get the same perceptual audio quality. You can't go PCM-DSD-PCM losslessly either.



Title: Re: Play/Convert DSD Stream Files (.dsf)?
Post by: bennetng on 2024-04-29 12:36:05
Regarding the Wikipedia illustration, it does not say it is a DSD signal, and if it is a DSD signal, it is an illegal signal.
X

https://archive.org/details/super-audio-cd-system-description/SACDspecP2audio_200%20contents/page/136/mode/2up
X

https://www.dafx.de/paper-archive/2004/P_372.PDF
X

Check out the spectrum of the attached 7z file. It is a 441Hz tone at 44100Hz sample rate.
X

X

This article from the developer of SoX's DSD extension could be useful as well:
https://troll-audio.com/articles/pcm-and-dsd/