HydrogenAudio

Hydrogenaudio Forum => Uploads => Topic started by: SebastianG on 2005-10-08 23:55:08

Title: DSD-2-PCM -- proof of concept
Post by: SebastianG on 2005-10-08 23:55:08
The ZIP contains 4 files:
- dsd2pcm.jar (the converter written in Java, outputs raw 24/88 PCM, intel byte order)
- info.txt (contains some infos)
- test2822k.dsd (14 seconds, mono DSD, 5 megs)
- test44k.mp3 (conversion result)

have fun,
Sebi

Edit-2011: For the latest C/C++ source code see https://code.google.com/p/dsd2pcm/ (https://code.google.com/p/dsd2pcm/) It is released under the new BSD license. The attatchment to this post is still the first Java release.

Title: DSD-2-PCM -- proof of concept
Post by: skamp on 2005-10-09 01:27:44
Now you need to develop a DVD-ROM driver for reading SACD's and find a way to crack the copy protection schemes, and we're all set! You don't have a choice anymore.
Title: DSD-2-PCM -- proof of concept
Post by: SebastianG on 2005-10-09 10:32:23
Quote
Now you need to develop a DVD-ROM driver for reading SACD's and find a way to crack the copy protection schemes, and we're all set! You don't have a choice anymore.

[a href="index.php?act=findpost&pid=332839"][{POST_SNAPBACK}][/a]


Intercepting the raw DSD stream between an SACD player's decoder and its DAC would probably be easier. (I've no experience on this subject.)

Sebi
Title: DSD-2-PCM -- proof of concept
Post by: SebastianG on 2005-10-09 11:06:39
Oh, I noticed a small bug: The dsd file size must be divisible by 4. This is due to the 2nd stage wanting to "convert" 4 samples to one (4:1 decimator) -- the first stage turns each byte into a float sample (8:1 decimation).

Cheers,
Sebi
Title: DSD-2-PCM -- proof of concept
Post by: tarsier on 2006-12-24 19:33:58
So is it theoretically possible to convert the PCM output back into a DSD stream so that it matches the original DSD stream? In other words is a DSD->PCM->DSD conversion theoretically lossless?
Title: DSD-2-PCM -- proof of concept
Post by: putanik on 2006-12-24 21:54:40
So is it theoretically possible to convert the PCM output back into a DSD stream so that it matches the original DSD stream? In other words is a DSD->PCM->DSD conversion theoretically lossless?


see http://focus.ti.com/lit/ds/symlink/pcm1796.pdf (http://focus.ti.com/lit/ds/symlink/pcm1796.pdf) - it does both PCM and DSD "good enough".
Title: DSD-2-PCM -- proof of concept
Post by: tarsier on 2006-12-26 15:28:32
Thanks for the link.  But right now, I'm only concerned with the theory at the moment.  There are many people who claim that DSD is superior to PCM (they say it sounds better).  But on the vast majority of converter chips that give you a PCM signal, the conversion is a 1-bit delta-sigma stream that is converted to PCM.  DSD is just that 1-bit stream before the conversion.

In discussions I've had on this topic, I say that there isn't any difference between DSD and PCM if the conversion to PCM (in other words the delta-sigma stream conversion to pcm) is done with care.  What I don't know is if theoretically and mathematically, is the conversion actually lossless.  So is it theoretically possible (not just good enough for audio) to go from DSD to PCM and then back to DSD without losing any information?  If so, it seems that the DSD/PCM discussions are moot, and it all boils down to how good the actual implementation is.

And is there a better forum to post this in?  I just posted here due to the topic of DSD->PCM conversion.
Title: DSD-2-PCM -- proof of concept
Post by: Kees de Visser on 2006-12-26 18:03:52
In discussions I've had on this topic, I say that there isn't any difference between DSD and PCM if the conversion to PCM (in other words the delta-sigma stream conversion to pcm) is done with care.
DSD and PCM exist in various formats so you'd have to be a bit more specific. "DSD" is usually 64Fs DSD but there are also 128Fs converters. When DSD is converted to PCM for editing/mixing purposes 24bit 352.8 kHz seems to be a popular choice (Pyramix workstation e.g.). Still, some recording engineers claim (no proof) that there is an audible difference (example (http://www.gearslutz.com/board/showpost.php?p=305114&postcount=10)). Another option is 8 bit 2.8 MHz PCM (Sonoma and Sadie workstation). My guess is that when the conversion involves sample rate and/or wordlength reduction, it can't be considered lossless. Most DSD users I know don't think the quality "loss" is something to worry about.
I gladly leave the final answer to the mathematical experts on this forum.
Title: DSD-2-PCM -- proof of concept
Post by: andyshedd on 2007-01-08 21:44:08
I'm mildly curious how this method compares and contrasts to Sony's own SBM Direct conversion system for DSD, bit and sample rate levels aside--in terms of perceived sound quality. In my experience SBM Direct-encoded CDs are among the least fatiguing and irritating redbook cds that I have heard, especially with players that are prone to jitter. But if this system preserves more of the audio information of the original DSD recording then that benefit may be offset, assuming an appropriate D-to-A converter is used for playback of the converted recording.
Title: DSD-2-PCM -- proof of concept
Post by: frenchglen on 2009-06-08 15:23:01
Is there any updated info about this program? I tried it, and it worked. Seems useful.

It would be interesting if it could support stereo, and support .DFF, which afaik is pretty much the same as .DSD, perhaps interchangeable. There's test DFF files at http://www.2l.no/hires/index.html (http://www.2l.no/hires/index.html).

Or even more useful, DSF files. with Sony DSD Direct software you can convert stereo PCM to DSF, but there's no program (I know of) to convert back to PCM.
Title: DSD-2-PCM -- proof of concept
Post by: LukeS on 2009-11-23 14:56:45
I am bringing this back form years of being dead.  I am working on hardware now to rip a SACD, I am capturing the raw unencrypted 6 mono DSD data streams that is sent to the DACs in my denon SACD player.  I have some test data captured that I want to run through the DSD to PCM software but I am unable to read the sample DSD file provide with the program after it is converted to PCM.  Once I get the test file confirmed I can move on to testing my captured data.

I really hope SebastianG is still around.  Does anyone know what format the outputted PCM file from the program is in 16-bit, or 32-bit?  If 32 bit what IEEE float (0.24, 16.8, 24.0).  Is there an offset? Is the byte order little-endian or big endian?  I used your program to convert the sample test2822k.dsd to a pcm and am trying to open it an Audacity and cooledit pro with no luck.  I will keep messing with the options and hopefully stumble upon the right setting.

Thanks!
Luke
Title: DSD-2-PCM -- proof of concept
Post by: GeSomeone on 2009-11-23 18:12:10
I think it's in the first post.
outputs raw 24/88 PCM, intel byte order)

Title: DSD-2-PCM -- proof of concept
Post by: SebastianG on 2009-11-23 19:31:45
I think it's in the first post.
outputs raw 24/88 PCM, intel byte order)


Correct. The info.txt file says it all.
Input: raw mono DSD where the bytes' bits are processed from LSB to MSB. The file size must be a multiple of 4.
Output: raw 24bit PCM at 88.2 kHz in little endian format.

The decimation is done in two stages:
1. 8:1 (from 44100*64 to 44100*8 Hz)
2. 4:1 (from 44100*8 to 44100*2 Hz)

If you leave out the 2nd stage you basically have what's known as DXD (PCM at 352kHz sampling frequency) which seems to be popular as an intermediate/processing format.

If you test it and the result sounds too noisy chances are that the bit order of your file and the expected bit order doesn't match. If you know a little about hacking code it should be easy to change it. I already have a table in there that for reversing the bits in a byte, for example.

The implementation of the first stage is a little tricky. Instead of 8 MACs (multiply-and-accumulate) for 8 bits in a byte I just use one table lookup. The bitreversal is needed anyway to exploit the FIR filter's impulse response's symmetry and reduce the size of the tables. If someone wants to code something similar in C I can recommend this approach.

Cheers,
SG
Title: DSD-2-PCM -- proof of concept
Post by: LukeS on 2009-11-23 21:32:11
SebastianG,

Awesome job on the program, my problem was that I was setting 16 or 32 bit depth, not 24, Duh!  I got it to work now with signed 24-bit, little-endian (intel).

I ripped 28 seconds (legal to post) of the Norah Jones - Come away with me - 04 - Feelin' The Same Way which I will attach.  The output 88200Hz PCM has a hiss and static on it as you mentioned in your post.  Is there a command line switch to output at the first stage 352kHz

I am much more of a hardware person then software and when I do software I do low level C not java so I may not be much use on the code front but I would love to take a look for fun.  I will try an figure out how to extract the jar, look at the code, and see if I can tinker with it.
Title: DSD-2-PCM -- proof of concept
Post by: vincefalks on 2009-11-23 23:17:00
I am not an expert but it would be cool to compare to other DSD to PCM converters out there (if possible). There's a DSD plugin for WMP which concerts stereo DSDIFF/DSF to 16-bit 44.1kHz.

As I understand it there's many options you can have when converting DSD to PCM and several different approaches, some good, some not as good.
Title: DSD-2-PCM -- proof of concept
Post by: rpp3po on 2009-11-24 01:48:14
What would be a higher quality approach than 1. converting to 32 bit samples 2. low passing 3. downsampling?

Of course, the choice of a specific low pass filter implies the usual trade-offs (delay, ringing, aliasing, ...). But your actual choice for DSD2PCM probably wouldn't look different than the one you would pick for a regular PCM2PCM decimation, for example 96 kHz -> 48 kHz, to the same target sample rate. Or not?
Title: DSD-2-PCM -- proof of concept
Post by: SebastianG on 2009-11-24 09:38:15
The output 88200Hz PCM has a hiss and static on it as you mentioned in your post. Is there a command line switch to output at the first stage 352kHz

No. That would not even help because the bit order affects the first stage. You could try to add a switch to enable/disable the "pre stage 1 bitreversal".

I will try an figure out how to extract the jar, look at the code, and see if I can tinker with it.

Just unzip it. .jar files are really .zip files with some added meta informations.

rpp3po is right. There's not a lot you can do differently in a mathematical sense than to pick other low pass filters. (Of course, the implementation might differ.) I even documented the properties of the two low pass filters. The paranoid user should be pleased with the 170 dB (IIRC) stopband rejection of the first stage. The lowpass filter's roll off starts at something around 25 kHz (IIRC). That's IMHO high enough because there's already an awful lot of noise just above it. (The DSD propaganda tells you that DSD has a "great dynamic range". That only applies to frequencies below 20kHz which is not surprizing).

Cheers,
SG
Title: DSD-2-PCM -- proof of concept
Post by: 2Bdecided on 2009-11-24 11:40:37
With the huge caveat that I made no attempt to do this properly or systematically in any way...

Interesting that if you perform the conversion badly (so that all the ultrasonic noise aliases back down into the audible band!) you hear noise that's anything-but-constant!

I know that exactly what you get is an artefact of whatever method you use to "wrongly" downsample - but even so it's interesting that this ultrasonic noise seems to vary so much - both in response to the music, and in some less predictable way.

If this was dither, it would be deemed to be very broken.


I know it's inaudible in normal playback, but if ultrasonic noise has any effect on replay equipment (assuming much of it reaches it - depends on the player) then having it vary is a bad thing - it's another potential cause of distortion which a supposedly "hi res" format can do without.

Cheers,
David.
Title: DSD-2-PCM -- proof of concept
Post by: vincefalks on 2009-11-24 12:07:16
The noise is indeed a problem with the DSD format and, format-wise, something only improved by DSD128 (pushes it up twice as high) and furthermore with DXD (even less noise).

When converting to PCM, my opinion would be that one should have the option to be able to tweak such filter settings as they see fit. If ones objective would be to perform the most accurate "capture" (for lack of a better word) of what's from the original DSD signal (within the frequency range of your PCM output), you should be able to capture the whole thing, noise and all, if you wanted. Even if just for analysis and debugging.
Title: DSD-2-PCM -- proof of concept
Post by: rpp3po on 2009-11-24 13:01:31
The problem with the "most accurate capture" is that DSD players do 'know' that terrible amounts of noise are there and their analog low-pass probably reaches far enough down to compensate somewhat. PCM doesn't have this problem, a good 96 kHz DAC will roughly output at least 40 kHz of perfect analog bandwidth. This would be a capture of the full digital DSD signal, but probably not an accurate capture of the equivalent DSD low passed 'experience'.

The noise is indeed a problem with the DSD format and, format-wise, something only improved by DSD128 (pushes it up twice as high) and furthermore with DXD (even less noise).


Yes, solve the problem by wasting space for insanely high bitrates, to rescue this purely marketing motivated technology, instead of using proper PCM. DSD has not a single advantage over PCM other than DA converter costs. Good DSD DAC can be built pretty cheaply, kind of strange when you're targeting the higher end. But excellent PCM DACs are also available at commodity prices nowadays. Just accept it, the format is dead.
Title: DSD-2-PCM -- proof of concept
Post by: vincefalks on 2009-11-24 13:25:50
The problem with the "most accurate capture" is that DSD players do 'know' that terrible amounts of noise are there and their analog low-pass probably reaches far enough down to compensate somewhat. PCM doesn't have this problem, a good 96 kHz DAC will roughly output at least 40 kHz of perfect analog bandwidth. This would be a capture of the full digital DSD signal, but probably not an accurate capture of the equivalent DSD low passed 'experience'.

No, that's right. But to someone who wants as full a picture (mathemaatically) of the original DSD signal should have access to everything if they want. And then filter it out later if they want.

Quote
The noise is indeed a problem with the DSD format and, format-wise, something only improved by DSD128 (pushes it up twice as high) and furthermore with DXD (even less noise).
Yes, solve the problem by wasting space for insanely high bitrates, to rescue this purely marketing motivated technology, instead of using proper PCM.

Well, I have no comment on that here , but if you were to stay within the DSD "family", those are the "solutions" to the noise problem (although DXD is in its own new category, or you might say it's within the PCM "family" - it is PCM-*based* but with a relaxed anti-alias filter giving it properties/elements of the DSD encoding scheme).

Quote
DSD has not a single advantage over PCM other than DA converter costs. Good DSD DAC can be built pretty cheaply, kind of strange when you're targeting the higher end. But excellent PCM DACs are also available at commodity prices nowadays. Just accept it, the format is dead.

I have no comment about the value of DSD other than that I value it for reasons such as this: we have quite a lot of music mastered and released in the format, and some of it on non-hybrid discs. I happen to value this unique high quality catalog of music (and even on non-hybrid discs, there is the multichannel mix not available on the redbook layer) and thus am interested in converting this music to PCM in the purest way possible.
Title: DSD-2-PCM -- proof of concept
Post by: saratoga on 2009-11-24 14:46:46
DSD has not a single advantage over PCM other than DA converter costs. Good DSD DAC can be built pretty cheaply, kind of strange when you're targeting the higher end. But excellent PCM DACs are also available at commodity prices nowadays. Just accept it, the format is dead.


I don't even think the converter costs thing is true anymore. 


No, that's right. But to someone who wants as full a picture (mathemaatically) of the original DSD signal should have access to everything if they want. And then filter it out later if they want.


Well they've got the source code and are free to comment out or replace any of the filters they like.
Title: DSD-2-PCM -- proof of concept
Post by: ExUser on 2009-11-24 14:49:40
I happen to value this unique high quality catalog of music (and even on non-hybrid discs, there is the multichannel mix not available on the redbook layer) and thus am interested in converting this music to PCM in the purest way possible.
I'd suggest keeping the originals as un-converted DSD and just decode to PCM on the fly using a foobar2000 component or something. I'm not sure that one exists currently, but having a library of lossless DSD material is probably preferable to the same material in PCM-decoded form. One less source of loss...
Title: DSD-2-PCM -- proof of concept
Post by: rpp3po on 2009-11-24 16:23:17
Raw DSD means saving about 3 GB per 70 minute stereo album. Kind of a waste when you can save 48kHz files, that should perfectly* preserve the 0-22 kHz band, and only need about 475 MB (FLAC). That's over 2.5 GB wasted, not for discarded but inaudible recorded information but plain quantization distortion, added by an inferior form of digitalization. Why save 2.5 GB of garbage per album? Has there ever been just one solid positive blind test for DSD?

* talk about differences of -110db or lower
Title: DSD-2-PCM -- proof of concept
Post by: LukeS on 2009-11-24 20:39:00
The problem with the "most accurate capture" is that DSD players do 'know' that terrible amounts of noise are there and their analog low-pass probably reaches far enough down to compensate somewhat. PCM doesn't have this problem, a good 96 kHz DAC will roughly output at least 40 kHz of perfect analog bandwidth. This would be a capture of the full digital DSD signal, but probably not an accurate capture of the equivalent DSD low passed 'experience'.

My Denon player has a setting labled "SACD Filter" which can be set to 50kHz or 100kHz.  I do not know what it is set to because I just got the player used a few days ago and it doesn't have a remote so I do not have access to the menu.  I have ordered a remote and once it comes I will go through and turn off any audio post processing options I can.  It the option is set to 50kHz, changing it to 100kHz may help with some of the noise I am getting.

I am very new to the SACD format but I am interested in picking up a second hand SACD player that outputs DSD over HDMI and trying to grab the DSD signals before they get encrypted and sent over HDMI, it may offer a less altered signal.


I'd suggest keeping the originals as un-converted DSD and just decode to PCM on the fly using a foobar2000 component or something. I'm not sure that one exists currently, but having a library of lossless DSD material is probably preferable to the same material in PCM-decoded form. One less source of loss...

My plan exactly, I will keep the originals for archival purposes and make a copy that is converted it to a lossless PCM format like FLAC if a good conversion becomes available.

Raw DSD means saving about 3 GB per 70 minute stereo album. Kind of a waste when you can save 48kHz files, that should perfectly* preserve the 0-22 kHz band, and only need about 475 MB (FLAC). That's over 2.5 GB wasted, not for discarded but inaudible recorded information but plain quantization distortion, added by an inferior form of digitalization. Why save 2.5 GB of garbage per album? Has there ever been just one solid positive blind test for DSD?

* talk about differences of -110db or lower

A couple things here...
48kHz files do not preserve 0-22kHz band perfectly,  the brick wall effect means that the high pass filters have to cut into much lower frequencies for seamless playback.

Storage is cheap nowadays and will keep getting cheaper, I keep all my music on a NAS server.  You can buy a 1.5TB drives for less then $100 each which is about 500 SACD albums depending how many tracks they have one them and over then next few years it will cost even less to store.

There is one important feature of SACDs that CD's do not offer, multi channel audio.  Many albums do not have any other multichannel format like DVD-A, blu-ray so SACD is the only option.

Also the storage could be greatly reduced is a loss less container format was made to store the raw DSD channels.
Title: DSD-2-PCM -- proof of concept
Post by: Axon on 2009-11-24 20:56:00
Look into the dynamic range of SACD at 22khz sometime. You'll be shocked.
Title: DSD-2-PCM -- proof of concept
Post by: rpp3po on 2009-11-25 02:00:33
48kHz files do not preserve 0-22kHz band perfectly,  the brick wall effect means that the high pass filters have to cut into much lower frequencies for seamless playback.


I think you'll have a hard time explaining this, because it's simply not true. What's the "brick wall effect"? Do you have that from Stereophile magazine?
Title: DSD-2-PCM -- proof of concept
Post by: LukeS on 2009-11-25 03:20:28
48kHz files do not preserve 0-22kHz band perfectly,  the brick wall effect means that the high pass filters have to cut into much lower frequencies for seamless playback.


I think you'll have a hard time explaining this, because it's simply not true. What's the "brick wall effect"? Do you have that from Stereophile magazine?


This is not from some magazine; I don't read those audiophile \ home audio magazines.  This is basic signal processing, learned it in my EE classes in college and has been reinforced by stuff I have done in practice and what I have read in professional technical publications.  You can read about this in any DSP textbook too.

The "brick wall" is an easy way of saying the frequency cutoff due to nyquist frequency which is half the sample rate.  You can not accurately capture frequencies above the nyquist frequency.  The problem when converting audio into 44.1kHz or 48kHz is the audio you are going to convert can not contain frequencies above 22.05kHz or 44kHz respectively.  All data sampled at higher sample rates (which master recordings are) contains higher frequency information then lower sample rate data unless the "brick wall" low pass filter was purposely set below the nyquist frequency.

A low pass filter is required to cutoff frequencies above the nyquist frequency to eliminate picking up aliasing of higher then nyquist frequency, frequency components of the original input waveform. This filter distorts and attenuates high frequencies near the low pass filter cut off point because if the filter was setup to be a sharp low pass filter it would cause auditable high frequency distortions.  Whether most people can hear this is arguable but the affect is there and that is just another reason why high fedility formats like 96kHz are nice.  DSD also does not suffer from this brick wall low pass filter problem.

It is also worth saying that 48kHz will not suffer as bad as CD 44.1kHz from this effect.

There are references to this all over the place but here is a reference I can remember and another explanation from a AES technical paper (http://web.archive.org/web/20020124220637/www.hdcd.com/partners/proaudio/AES_Paper.pdf) I read a a month or so ago on HDCD.

Quote
It is now clear that the very sharp cutoff "brick wall" filter required to represent an audio signal in digital form with a sampling rate only slightly higher than twice the audible frequency range does cause problems. This issue will be discussed in more depth below.

..

One can predict that fast cut off low pass filters could be problematic. The sharp removal of higher frequency sidebands creates response ripples from rapidly swept sine waves. These will alter peak energy at basilar membrane sites. In addition, ringing responses near transient events can mix with low level harmonics in the signal to create short beats. [17] One can perform simple experiments to demonstrate that both of these are audible.

The necessity of having a sharp cut-off brick wall anti-alias filter in a digital system in order accommodate a sampling frequency near the minimum necessary for the audio band is bound to create some distortions to sound envelopes. This can be easily demonstrated: If one measures the frequency response of such a low pass filter with a very slow frequency sweep, one gets the classical rectangular envelope. If, on the other hand, one increases the sweep speed, the envelope becomes full of ripples because the faster sweep produces sidebands which fall above the cutoff frequency of the filter. Removing the filter restores the rectangular envelope even for the fast sweep. Listening tests have shown that sweeps with different envelopes but the same spectral content do sound different, although it is very difficult to eliminate all system related sources of confusion in these tests.

Music can contain very complex high frequencies which produce complicated envelopes. It is a logical extension of the above results that if removing high frequencies, which in themselves may not be audible, produces changes in the envelope of audible sounds, then a change in those sounds can be heard. Changes in the characteristics of the filters in the neighborhood of their transition regions can have an effect on the behavior of signal envelopes.


There are other areas of the article that discuss how the brick wall nyquist filter affects the lower frequencies.  I didn’t feel like rereading the whole thing again to copy and past each reference.
Title: DSD-2-PCM -- proof of concept
Post by: Axon on 2009-11-25 03:59:16
Yes, let's all thank LukeS for being a boy scout and reciting Digital Signal Processing 101 to the rest of us. Particularly that bit about how designing reconstruction filters with a transition band of 0.08Fs is impossible, which is why you can't encode 0-22k perfectly in Fs=48khz. And how FIR filters cause nonlinear distortion.

Sorry for being a bastard, since it doesn't seem like you're wrong per se, at least on most of what you're saying. Nobody's disputing that the transition band ought to be at least a couple khz wide to reduce ringing, or that we'd all like to increase sample rates in the absence of any other cost or effect.

You've read Lipshitz/Vanderkooy (http://sjeng.org/ftp/SACD.pdf), right?
Title: DSD-2-PCM -- proof of concept
Post by: LukeS on 2009-11-25 04:21:36
Yes, let's all thank LukeS for being a boy scout and reciting Digital Signal Processing 101 to the rest of us. Particularly that bit about how designing reconstruction filters with a transition band of 0.08Fs is impossible, which is why you can't encode 0-22k perfectly in Fs=48khz. And how FIR filters cause nonlinear distortion.

Sorry for being a bastard, since it doesn't seem like you're wrong per se, at least on most of what you're saying. Nobody's disputing that the transition band ought to be at least a couple khz wide to reduce ringing, or that we'd all like to increase sample rates in the absence of any other cost or effect.

You've read Lipshitz/Vanderkooy (http://sjeng.org/ftp/SACD.pdf), right?


No need to be sarcastic, if you feel like explaining it better please do so.  I may have messed up the terminology because DSP is not my thing. I am not much of an analog or DSP person, I do digital design and prefer to stick with board design and digital logic design.  The bottom line was I knew that 48kHz does not perfectly preserve the 0-22kHz band and the guy wanted an explanation so I tried.

Thanks for the link to the paper, I am really new to SACD and i'll give it a read.

I nowhere claim SACD is perfect either and really just want to rip it for the multichannel audio that many artists do not offer in any other format.
Title: DSD-2-PCM -- proof of concept
Post by: saratoga on 2009-11-25 04:25:16
48kHz files do not preserve 0-22kHz band perfectly,  the brick wall effect means that the high pass filters have to cut into much lower frequencies for seamless playback.


I think you'll have a hard time explaining this, because it's simply not true. What's the "brick wall effect"? Do you have that from Stereophile magazine?


This is not from some magazine; I don't read those audiophile \ home audio magazines.  This is basic signal processing, learned it in my EE classes in college and has been reinforced by stuff I have done in practice and what I have read in professional technical publications.  You can read about this in any DSP textbook too.



Thats a very long way of not answering his question at all.  Let me try and focus you:

What's the "brick wall effect"?  Why does it mean that "high pass filters have to cut into much lower frequencies for seamless playback"?  Although I think you meant lowpass not high pass

Edit:  To be clear, you're claiming that you can't go up to 22kHz with good alias rejection using a 48kHz sampling rate, or rather that a DAC can't accurately reproduce ~.46*fs, which I think is a little nuts.
Title: DSD-2-PCM -- proof of concept
Post by: LukeS on 2009-11-25 04:29:17
Thats a very long way of not answering his question at all.  Let me try and focus you:

What's the "brick wall effect"?  Why does it mean that "high pass filters have to cut into much lower frequencies for seamless playback"?  Although I think you meant lowpass not high pass


The high pass filter is a typo and after I realized it I was locked out from editing it, apparently there is a edit timeout on this board    Also I think I explained the brick wall well enough

Quote
Edit:  To be clear, you're claiming that you can't go up to 22kHz with good alias rejection using a 48kHz sampling rate, or rather that a DAC can't accurately reproduce ~.46*fs, which I think is a little nuts.

I was not referring to the end user DAC \ output side of things, I was referring to input ADC, processing, and down sampling to 48kHz of the original audio data that causes issues.  Most people can't here this stuff or care.
Title: DSD-2-PCM -- proof of concept
Post by: saratoga on 2009-11-25 04:55:01
Also I think I explained the brick wall well enough


The reason I ask is that a brick wall filter doesn't "distort and attenuates high frequencies near the low pass filter cut off".  A brick wall filter is shaped like a brick.  Infinite attenuation on one side, unity on the other.  I would not call the use of something not a brickwall the brickwall effect

Quote
Edit:  To be clear, you're claiming that you can't go up to 22kHz with good alias rejection using a 48kHz sampling rate, or rather that a DAC can't accurately reproduce ~.46*fs, which I think is a little nuts.

I was not referring to the end user DAC \ output side of things I am discussing the input ADC, processing, and down sampling to 48kHz of the original audio data that causes issues.  Most people can't here this stuff or care.


Yes, and if the filter in a DAC can do it, then the same filter if used in a resampler can also do it.  So clearly it would be (and absolutely is) possible.
Title: DSD-2-PCM -- proof of concept
Post by: vincefalks on 2009-11-25 07:02:22
I am very new to the SACD format but I am interested in picking up a second hand SACD player that outputs DSD over HDMI and trying to grab the DSD signals before they get encrypted and sent over HDMI, it may offer a less altered signal.
I myself am not the biggest technical expert on the mathematics of PCM or DSD, but I thought nothing can be altered to the signal within the (digital) DSD domain - only at analog/PCM stage of the player, maybe. I might be wrong though. There certainly are other players which do not cut off ultra high freuencies like that Denon.

Quote
My plan exactly, I will keep the originals for archival purposes and make a copy that is converted it to a lossless PCM format like FLAC if a good conversion becomes available.

I concur.

Quote
Also the storage could be greatly reduced is a loss less container format was made to store the raw DSD channels.
Well THAT sir, is DST - it's like MLP for PCM/DVD-A. Currently, only rare pro applications can encode DST, but I hope in future we will have acces to such a facility.
Title: DSD-2-PCM -- proof of concept
Post by: knutinh on 2009-11-25 07:36:38
Also the storage could be greatly reduced is a loss less container format was made to store the raw DSD channels.


I think that LPCM offers lossless, uncompressed output from available, high-quality ADCs.

FLAC offers lossless compression of LPCM.

DSD offers unprocessed storage*) of ADCs that are no longer viable. For all other cases, it is simply a bad trade-off between filesize and quality.

DST offers lossless compression of DSD.

http://en.wikipedia.org/wiki/Sacd#DST (http://en.wikipedia.org/wiki/Sacd#DST)

-k

*)This is a benefit invented by PR and poorly educated audiophiles.
Title: DSD-2-PCM -- proof of concept
Post by: LukeS on 2009-11-25 08:16:42
I am very new to the SACD format but I am interested in picking up a second hand SACD player that outputs DSD over HDMI and trying to grab the DSD signals before they get encrypted and sent over HDMI, it may offer a less altered signal.
I myself am not the biggest technical expert on the mathematics of PCM or DSD, but I thought nothing can be altered to the signal within the (digital) DSD domain - only at analog/PCM stage of the player, maybe. I might be wrong though. There certainly are other players which do not cut off ultra high freuencies like that Denon.

See the attached a screen shot from the Denon DVD-955 / DVD-2910 manual, there is some filtering going on in the player.  Either this is an option that is set on the DACs (most likely I would think), in the analog circuity, or the Denon player post-processes the DSD signal and applies a 50kHz or 100kHz filter before sending it to the DACs.  If this is the case it is probably done in the sony DSD chip but it would seem to be way to processing intensive to do so and is probably done in the analog domain.  I have some digging to do in the DAC datasheet to find out  exactly.

Quote
Quote
Also the storage could be greatly reduced is a loss less container format was made to store the raw DSD channels.
Well THAT sir, is DST - it's like MLP for PCM/DVD-A. Currently, only rare pro applications can encode DST, but I hope in future we will have acces to such a facility.

Haha, yea that's the problem, I don't have thousands of dollars or access to pro tools 

Also the storage could be greatly reduced is a loss less container format was made to store the raw DSD channels.


I think that LPCM offers lossless, uncompressed output from available, high-quality ADCs.

FLAC offers lossless compression of LPCM.

DSD offers unprocessed storage*) of ADCs that are no longer viable. For all other cases, it is simply a bad trade-off between filesize and quality.

DST offers lossless compression of DSD.

http://en.wikipedia.org/wiki/Sacd#DST (http://en.wikipedia.org/wiki/Sacd#DST)

-k

*)This is a benefit invented by PR and poorly educated audiophiles.


DST would work but I have not found a no low cost or free software to convert raw DSD to DST or to combine the 6 mono DSD files captured and compress them in a DST file. There is no mainstream information no how to rip the DST \ DSF files on the SACD so that option is out.

FLAC and others are PCM formats and I would like to compress the raw DSD files I capture so those formats are out.  ZIP works but it is not optimized for DSD, it will do until I can do something with the DSD files anyways.  If a free or low cost tool comes about to convert DSD to PCM or if I figure out why the program SebastianG is not liking my DSD files I will store the converted PCM output in FLAC.  I may just end up buying a player that converts the DSD to high sample rate LPCM, grab the unencrypted signals in the player, save that to FLAC, and be done with it.
Title: DSD-2-PCM -- proof of concept
Post by: Martel on 2009-11-25 09:24:11
The bottom line was I knew that 48kHz does not perfectly preserve the 0-22kHz band and the guy wanted an explanation so I tried.
The question is - how many people actually care? If you have a 48kHz fs content which is has a low-pass applied rolling-off from 21kHz (say -3dB @ 21kHz) how many people would be able to actually hear this? I remember when I was 18 I could hear up to 20kHz (18,5 kHz @ 29) but since most people usually don't have enough money at that age to buy an equipment able to reproduce such content flawlessly, I guess it does not matter much if at all (the consequences being largely academical).
The point is, if you want to hear the "true music", you go to a live performance where the stuff in question does not usually matter.
Title: DSD-2-PCM -- proof of concept
Post by: SebastianG on 2009-11-25 09:32:22
See the attached a screen shot from the Denon DVD-955 / DVD-2910 manual, there is some filtering going on in the player.

Of course there is. At 20 kHz you still have a dynamic range of 110 dB, but it goes down very quickly. Starting at 100kHz you have pure noise. The quantization noise is so powerful up there that is it probably 10^4 times larger than anything "natural" you would want to record. So, of course you need filtering. Anything above 100kHz should be attenuated by at least 100 dB, starting the roll off at 50kHz or so. You can beat this easily with a simple PCM system running at 200 kHz and 8 bits/sample at nearly half the data rate of DSD64. Go figure.

Quote
I think that LPCM offers lossless, uncompressed output from available, high-quality ADCs.

IMHO, the terms "lossless" and "lossy" only apply to a process that turns one signal/bitstream to another.

Cheers,
SG
Title: DSD-2-PCM -- proof of concept
Post by: rpp3po on 2009-11-25 11:04:18
Sorry, if I didn't express myself clearly enough. I did not actually want to ask for an explanation. I thought it was self-explanatory that saying "0-22kHz" made it clear, that - at 48 kHz - 22-24kHz can be used to dump the trash. It is far above anything you could ever hear, if you aren't a bat. It is even high enough to allow some aliasing at the upper end and trade it in for less* ringing in the pass-band.

* up to absolutely inaudible for humans
Title: DSD-2-PCM -- proof of concept
Post by: 2Bdecided on 2009-11-25 11:13:52
Sorry for being a bastard
No, carry on.

The problem with forums seems to be that people with zero knowledge and experience (not to mention a mere ten posts) don't know that some of the people they're talking to have actually built the very processes and systems they're misdescribing*.

There's a limit to how much patience you can have.


In the physical world, someone straight out of school wouldn't walk into IBM or Cambridge and start telling the project managers or professors how DSP works. But the equivalent happens in the virtual world all the time.


I'm thinking of writing a polite stock paragraph to paste in on such occasions - it seems the phrase "teaching your grandmother to suck eggs" doesn't translate, or is not well known - and if you have to explain it further, it just causes bad feeling on all sides.

Cheers,
David.

* - which is quite poor in this case, since the thread starts with SebG's java implementation of the same, and the FAQ includes threads which discuss this topic to death.
Title: DSD-2-PCM -- proof of concept
Post by: knutinh on 2009-11-25 17:02:48
DST would work but I have not found a no low cost or free software to convert raw DSD to DST or to combine the 6 mono DSD files captured and compress them in a DST file. There is no mainstream information no how to rip the DST \ DSF files on the SACD so that option is out.

FLAC and others are PCM formats and I would like to compress the raw DSD files I capture so those formats are out.  ZIP works but it is not optimized for DSD, it will do until I can do something with the DSD files anyways.  If a free or low cost tool comes about to convert DSD to PCM or if I figure out why the program SebastianG is not liking my DSD files I will store the converted PCM output in FLAC.  I may just end up buying a player that converts the DSD to high sample rate LPCM, grab the unencrypted signals in the player, save that to FLAC, and be done with it.

Am I right that you bought/built a grabber for SACD, grabbing the DSD stream prior to the DAC? That seems like an expensive and/or time-consuming hobby project. Surely a few hard-drives or DVD-R disks is no big issue then?

I dont think you can buy an off-the-shelf player that plays SACD, converting it to LPCM and serving it on a non-encrypted channel?

-k
Title: DSD-2-PCM -- proof of concept
Post by: Axon on 2009-11-25 18:38:11
It's a surprisingly well known mod, actually. It's not the first time I've heard of it.
Title: DSD-2-PCM -- proof of concept
Post by: rpp3po on 2009-11-25 19:38:54
I find it interesting, nevertheless. What equipment do you use to convert the electrical signal into a logical bitstream after tapping the wire?
Title: DSD-2-PCM -- proof of concept
Post by: simmconn on 2009-11-26 00:31:00
Quote
DST would work but I have not found a no low cost or free software to convert raw DSD to DST or to combine the 6 mono DSD files captured and compress them in a DST file. There is no mainstream information no how to rip the DST \ DSF files on the SACD so that option is out.

FLAC and others are PCM formats and I would like to compress the raw DSD files I capture so those formats are out.  ZIP works but it is not optimized for DSD, it will do until I can do something with the DSD files anyways.  If a free or low cost tool comes about to convert DSD to PCM or if I figure out why the program SebastianG is not liking my DSD files I will store the converted PCM output in FLAC.  I may just end up buying a player that converts the DSD to high sample rate LPCM, grab the unencrypted signals in the player, save that to FLAC, and be done with it.


Time for some Googling. DST is part of IEC14496-5 and the reference code can be obtained at no charge.
Title: DSD-2-PCM -- proof of concept
Post by: udauda on 2009-11-26 01:31:09
You've read Lipshitz/Vanderkooy (http://sjeng.org/ftp/SACD.pdf), right?

The question I am about to ask might be quite irrelevant from the topic but I've been wondering for too long.. 

Does the Lipshitz/Vanderkooy paper correspond with this article at ESP?
http://sound.westhost.com/cd-sacd-dvda.htm (http://sound.westhost.com/cd-sacd-dvda.htm)
Title: DSD-2-PCM -- proof of concept
Post by: vincefalks on 2009-11-26 02:38:24
Quote
DST would work but I have not found a no low cost or free software to convert raw DSD to DST or to combine the 6 mono DSD files captured and compress them in a DST file. There is no mainstream information no how to rip the DST \ DSF files on the SACD so that option is out.

FLAC and others are PCM formats and I would like to compress the raw DSD files I capture so those formats are out.  ZIP works but it is not optimized for DSD, it will do until I can do something with the DSD files anyways.  If a free or low cost tool comes about to convert DSD to PCM or if I figure out why the program SebastianG is not liking my DSD files I will store the converted PCM output in FLAC.  I may just end up buying a player that converts the DSD to high sample rate LPCM, grab the unencrypted signals in the player, save that to FLAC, and be done with it.


Time for some Googling. DST is part of IEC14496-5 and the reference code can be obtained at no charge.

What does this mean? code that you can make an encoder from? Never heard of this concept before. Does MLP have a "reference code", as an example? I thought it was proprietary.
Title: DSD-2-PCM -- proof of concept
Post by: LukeS on 2009-11-26 06:27:02
Wow, I really am messing thing up lately  ; I got the SACD, DSD ripping working.  There was an error in the software program I wrote that translates the data captured from the hardware and puts it into a DSD file.  Attached is 28 seconds of the front left channel of Ryan Adams - Gold - 01 - New York, New York.  SebastianG program works great.
Title: DSD-2-PCM -- proof of concept
Post by: simmconn on 2009-11-26 07:16:17
And I just spent one and a half hours to encode an 8 minutes 44 seconds stereo DSD into DST, only to find that it cannot be played in real time with the foobar2000 DSD plugin.
Title: DSD-2-PCM -- proof of concept
Post by: 2Bdecided on 2009-11-26 10:46:43
Does the Lipshitz/Vanderkooy paper correspond with this article at ESP?
http://sound.westhost.com/cd-sacd-dvda.htm (http://sound.westhost.com/cd-sacd-dvda.htm)
Not really, they're separate and independent, by different authors.

Lipshitz and Vanderkooy show inherent distortion in 1-bit systems. Your links discusses inherent noise. They're two different problems.

Cheers,
David.
Title: DSD-2-PCM -- proof of concept
Post by: vincefalks on 2009-11-26 11:02:08
Lip*****z and Vanderkooy show inherent distortion in 1-bit systems.

This is definitely off-topic, but can I briefly ask - is the distortion in 1-bit audio similar to the distortion in vinyl? And is this 1-bit distortion audible...like vinyl's...thx
Title: DSD-2-PCM -- proof of concept
Post by: rpp3po on 2009-11-26 11:37:20
Yawn!  Am I really the last one to get where this guy is coming from?

No, of course it not similar! Why should the distortion of 1-bit Delta-Sigma-Modulation correlate with the molecular properties of vinyl and dust, and the mechanical properties of manual tracking and needle movement? That question seems to come from a mind desperately wanting to finally give some sense to a senseless belief system, fed by marketing and idiot group think.

The only similarity is that both distortions are non-linear, but also are vocoders and wah-wah effects.
Title: DSD-2-PCM -- proof of concept
Post by: vincefalks on 2009-11-26 12:10:21
Yawn!  Am I really the last one to get where this guy is coming from?

No, of course not! Why should the distortion of 1-bit Delta-Sigma-Modulation correlate with the molecular properties of vinyl and dust, and the mechanical properties of manual tracking and needle movement? That question seems to come from a mind desperately wanting to finally give some sense to a senseless belief system, fed by marketing and idiot group think.

The only similarity is that both distortions are non-linear, but also are vocoders and wah-wah effects.

You're so used to wild audiophiles claiming crazy theories that you automatically assume someone bringing up a question like mine means they also have a wild theory.

How wrong you are!

THIS is where I am coming from: Very uneducated vinyl zealots (I believe Michael Fremer said this on a youtube video) think that vinyl's warmth is what "lifelike analog" sound is (compared to "cold" jagged digital). (when in fact it is certain distortions in the medium). SACD zealots also think that SACD has a "lifelike analog" sound, but I know that SACD also has certain distortions in it.

Thus I've been wondering, PONDERING (and not even claiming!) if there might be a correlation between these two scenarios, or if it's just a funny coincidence. I don't know much about these distortions, and wanted to briefly ask someone who does. this is an audio forum about HELPING others and sharing scientifically valid information. I asked a question, that's all..

A simple no would suffice, along with some explanation and without the attitude and assumptions unrelated to the content of the question. And you didn't answer my second part of the question, "And is this 1-bit distortion audible?".
Title: DSD-2-PCM -- proof of concept
Post by: rpp3po on 2009-11-26 12:25:12
At least you seem believe the life-like-analog-sound-myth of SACD.

When properly dithered, in this context that means only partially dithered, SACD's distortions are inaudible in the 0-22kHz band (and above anyway).
Title: DSD-2-PCM -- proof of concept
Post by: vincefalks on 2009-11-26 12:40:46
At least you seem believe the life-like-analog-sound-myth of SACD.

LOL. Just stop. Nothing I have written has indicated what you just claimed, in fact, the exact opposite. I was comparing both myths to each other and wondering about a possible reason behind SACD's case, of which I don't know much about the science.

Quote
When properly dithered, in this context that means only partially dithered, SACD's distortions are inaudible in the 0-22kHz band (and above anyway).

Ah now that's better. t h a n k  y o u.

back on topic now...
Title: DSD-2-PCM -- proof of concept
Post by: 2Bdecided on 2009-11-26 14:57:35
Yes, the distortions of SACD are inaudible. Especially within the 0-16kHz region they're way way way way down. At least at first pass. If people take DSD and process it, things could go very wrong (hence its conversion to multi-bit for processing, discussed earlier in the thread).

If DSD/SACD has a "sound", it's the interaction of all that high frequency noise with every other piece of equipment in the audio chain.

This could just be another myth - I've never seen anyone ABX it - but it's "common knowledge" with many audio engineers I've spoken to (going way back before SACD), that if you pump lots of ultrasonic stuff through an audio system, you change its sound. The pre-dates the modern (~decade-old) "idea" that ultrasonic information is somehow audio - this is plain and simple "all the ultrasonic junk changes the way imperfect audio equipment works".

One effect is certainly real, measurable, and perceptible: the listening room warms up in the vicinity of the audio equipment as all the amps and tweeters work so much harder and generate more heat!

Cheers,
David.
Title: DSD-2-PCM -- proof of concept
Post by: ExUser on 2009-11-26 15:22:47
So that's what they mean by "warm" sound! Thanks for the clarification, David.
Title: DSD-2-PCM -- proof of concept
Post by: Axon on 2009-11-26 20:14:36
If SACD really did have a similar distortion profile to vinyl, after spending lots and lots of time on the latter subject, I'm here to you that the distortion on SACD would be composed of lots and lots of jitter.

Which nobody really sees, but if we did, it would kinda pop a bubble in the SACD-superiority thing, wouldn't it? (I'm glossing over some details about low order distortion, but really, you have to be splitting some fine hairs to make that distinction here.)
Title: DSD-2-PCM -- proof of concept
Post by: SebastianG on 2009-11-27 02:26:16
Just for kicks and giggles I rewrote most of "dsd2pcm" in C and C++. Compared to the java tool, it lacks the 2nd stage but it supports multiple channels and user-selectable bit ordering and output bitdepth (16 or 24). Without the 2nd stage you basically get "DXD" (PCM at 352.kHz). I figured, once you have a PCM stream you could just as well use any sampling rate converter to do further processing. Though, keep in mind that the resulting 24/352 PCM signal is a big waste of hard disc space since there will be a lot of ultrasonic noise in there (blame DSD, not me!). I recommend further downsampling and/or an additional lowpass filter (kicking in at 50 kHz). If you like such high sampling rates and want to do lossless compression afterwards, you really should do some filtering.

You might want to download some DSD files from here (http://www.2l.no/hires/index.html) to test a little. I successfully tested a DSD64 stereo track like this:
Code: [Select]
sg@home:~/ccpp/dsd2pcm$ cat 2L38_01_DSD.dff | ./dsd2pcm 2 m 24 | sox -t raw -r 352800 -s -3 -c 2 - -r 88200 -b 24 test.wav


(Of course, this only works for uncompressed DSD files)

This conversion was done in approx 30 X real-time on my computer (2.4 GHz Core2 Duo). So, I'm a little surprized to see some people are having problems playing back DSD in real time. BTW: I didn't find the foobar2k DSD plugin. Does anybody have a link?

Cheers!
SG

latest source code: https://code.google.com/p/dsd2pcm/ (https://code.google.com/p/dsd2pcm/)
Title: DSD-2-PCM -- proof of concept
Post by: vincefalks on 2009-11-27 02:44:08
Just for kicks and giggles I rewrote most of "dsd2pcm" in C and C++. Compared to the java tool, it lacks the 2nd stage but it supports multiple channels and user-selectable bit ordering and output bitdepth (16 or 24). Without the 2nd stage you basically get "DXD" (PCM at 352.kHz). I figured, once you have a PCM stream you could just as well use any sampling rate converter to do further processing.

You might want to download some DSD files from here (http://www.2l.no/hires/index.html) to test a little. I successfully tested a DSD64 stereo track like this:
Code: [Select]
sg@home:~/ccpp/dsd2pcm$ cat 2L38_01_DSD.dff | ./dsd2pcm 2 m 24 | sox -t raw -r 352800 -s -3 -c 2 - -r 88200 -b 24 test.wav


(Of course, this only works for uncompressed DSD files)

That's awesome, SG! I'm going to try a multichannel DFF...super . Oh no hang on - bah I'm a n00b - how do you compile it in windows, or can you provide a windows binary?

Honeslty not much info is known on this, but people keep claiming that 352.8kHz PCM IS DXD, when I really think it's not. I myself don't have tonnes of info on it, but for TRUE DXD I think you need to change something else in the encoding of it too (different roll-off filter to PCM). So it's just ultra hi-res PCM in this case.

Quote
This conversion was done in approx 30 X real-time on my computer (2.4 GHz Core2 Duo). So, I'm a little surprized to see some people are having problems playing back DSD in real time. BTW: I didn't find the foobar2k DSD plugin. Does anybody have a link?

Cheers!
SG

It's here (http://www.hydrogenaudio.org/forums/index.php?showtopic=76080).

It's DST-encoded files that we're having troubles with, not uncompressed DSD. The reference decoder is quite "unoptimal" by the looks of it, and could be improved a lot. Right now it's only good for storage, not on the fly decoding.
Title: DSD-2-PCM -- proof of concept
Post by: SebastianG on 2009-11-27 03:14:59
That's awesome, SG! I'm going to try a multichannel DFF...super . Oh no hang on - bah I'm a n00b - how do you compile it in windows, or can you provide a windows binary?

Sorry, I can only offer a "32bit x86 Linux binary" at the moment.

It's here (http://www.hydrogenaudio.org/forums/index.php?showtopic=76080).

Sweet.

Cheers,
SG
Title: DSD-2-PCM -- proof of concept
Post by: rpp3po on 2009-11-27 03:16:08
Honeslty not much info is known on this, but people keep claiming that 352.8kHz PCM IS DXD, when I really think it's not. I myself don't have tonnes of info on it, but for TRUE DXD I think you need to change something else in the encoding of it too (different roll-off filter to PCM). So it's just ultra hi-res PCM in this case.

How can a n00b with only 18 posts already cause so much  pain? You yourself might not "have tonnes of info on it", but apparently tonnes of bullshit to spread anyway. All you have posted here indicates an urge to find technical justification for marketing induced belief. You don't understand what DXD is, but you know it must be better. You don't understand what DSD is, but hey it must have something to it, even if it is analogish distortion, as reported by your choice of experts.

DXD fixes a bad design choice of DSD (by todays standards) and the fix is plain PCM. But hey, it can't be. DXD is supposed to be better than DSD, DSD is supposed to be better than PCM, ergo DXD can't be just PCM, else it would sound "digitalish", wouldn't it? That is your apparent mindset. When you say you "really think it's not" it would be more honest to say you "really believe it's not" as in "I believe in the maidenhood of mary". I think there are other forums where you would get much more positive resonance for that kind of interest.

Edit: Vincefalks, I've skimmed briefly over what you have actually written so far in this thread. I must admit you soft-pedaled much more than I remembered and guessed from your last comment, which I considered a little insolent as a first reaction to the posted programming work. Especially when it's totally unfounded.

Just for kicks and giggles I rewrote most of "dsd2pcm" in C and C++.

Although I don't have any current use for your binary, your code is always an interesting read. That's pretty good work for such a short time! And the code even includes documentation... 
Title: DSD-2-PCM -- proof of concept
Post by: vincefalks on 2009-11-27 04:11:53
Sorry, I can only offer a "32bit x86 Linux binary" at the moment.

Ok. well do you have a paypal account, maybe I can speed it up 

Honeslty not much info is known on this, but people keep claiming that 352.8kHz PCM IS DXD, when I really think it's not. I myself don't have tonnes of info on it, but for TRUE DXD I think you need to change something else in the encoding of it too (different roll-off filter to PCM). So it's just ultra hi-res PCM in this case.


How can a n00b with only 18 posts already cause so much  pain? You yourself might not "have tonnes of info on it", but apparently tonnes of bull***** to spread anyway. All you have posted here indicates an urge to find technical justification for marketing induced belief. You don't understand what DXD is, but you know it must be better. You don't understand what DSD is, but hey it must have something to it, even if it is analogish distortion, as reported by your choice of experts.

DXD fixes a bad design choice of DSD (by todays standards) and the fix is plain PCM. But hey, it can't be. DXD is supposed to be better than DSD, DSD is supposed to be better than PCM, ergo DXD can't be just PCM, else it would sound "digitalish", wouldn't it? That is your apparent mindset. When you say you "really think it's not" it would be more honest to say you "really believe it's not" as in "I believe in the maidenhood of mary". I think there are other forums where you would get much more positive resonance for that kind of interest.

I'm sorry, but you're only embarassing yourself. Let me rebut you and completely blow away your silly assumptions with *fact*, *reason* and *science*.

1. I have another alias on hydrogenaudio, which I used up until recently, and did so for about 2, maybe 3 years IIRC. It was nothing like a 300+ post profile and I've never been a "regular" per se, but by me merely being "new" you're assuming that I don't know anything about HA, aren't you? Completely wrong. I have been frequenting and posting at these boards for years - and knopw exactly what this community is about. I switched to this new username for a certain reason which I have a right to keep to myself, and no it has nothing to do with anything I did in my previous profile and "starting afresh" or something stupid like that - as I said, I was never an active user anyway. It's a certain privacy issue (I have changed identities for certain privacy reasons) which I have a right to do. Oh and if you now took this info I've just posted and falsely accuse and assume (once again) that I must have been some idiot and got caught in some embarassing or controversial affair on HA and started afresh to escape that previous identity (it seems you are quick to falsely blame people of that sort of thing), that would just be completely lame. The mods would know, as per the IP addresses under my posts on both profiles, who I used to be, although I recently moved houses and IPs too....

2. Have I indicated ANYWHERE that I believe that certain mathematical characteristics in digital audio (like different roll-off filters), correlates to better/different perceived audio quality? NO! Do I have to justfy why I want a certain setting/feature in digital audio? NO! I might just be someone who wants to edit audio files in the highest possible anal quality (and not for subjective "audio quality" reasons)! It's not your business to question why I am persuing certain digital formats or conversion/encoding settings. I have not claimed ANYWHERE that I am pursuing certain formats for their "audio quality".

You are making an ASSUMPTION based on stereotypes and linking it with a new profile here at HA (I'm not new) and my self-admittance of not being an expert on digital signal processing, and my raising questions which might be n00by and even unscientific in nature (but NOT invalid as I'm not making any claims - "wondering" is a part of science and the unknown), and creating a picture that is completely innacurate!

Can you stop n00b bashing please? Just because I'm not an expert on digitial signal processing....I unashamedly participate in these forums no matter what my level of knowledge is, and someone like you and your attitude, I'm sorry, but that won't stop me from making my contributions, whatever you interpret them to be.

Now back to THIS case about DXD: I am interpreting what seems to be not very widely-known SCIENTIFIC information on a very new digital audio format. All sources of information say that DXD is PCM-like, NOT PCM!!!!

The white paper, and other sources on the internet, say that because it has an ultra-high sampling rate, "it can afford to have a more relaxed anti-alising filter" (and thus, characteristically, has a closer pulse response and frequency response to DSD). This is scientific information, NOTHING to do with pereived sound quality!

Now, I want to get to the bottom of this, because I'm not sure if "it can afford to have a more relaxed anti-alising filter" means it DOES have a more relaxed anti-alising filter than PCM. I READ somewhere that yes, it DOES, but can't find that info since DXD is so obscure and new.

rpp3po, I am neutral and objective in ALL my posts here and you're making a whole lot of claims otherwise!!!


Quote
All you have posted here indicates an urge to find technical justification for marketing induced belief

Let me put it to you mate: I have an urge for TECHNICAL PERFECTION (in this case), INDEPENDENT OF WHAT THAT MIGHT MEAN IN TERMS OF SOUND QUALITY! And I don't CARE if you think that's overkill or unnecessary or crazy or a waste of bandwidth or effort or space! I really don't...
Title: DSD-2-PCM -- proof of concept
Post by: LukeS on 2009-11-27 06:33:37
Just for kicks and giggles I rewrote most of "dsd2pcm" in C and C++. Compared to the java tool, it lacks the 2nd stage but it supports multiple channels and user-selectable bit ordering and output bitdepth (16 or 24). Without the 2nd stage you basically get "DXD" (PCM at 352.kHz). I figured, once you have a PCM stream you could just as well use any sampling rate converter to do further processing.

Awesome work 


That's awesome, SG! I'm going to try a multichannel DFF...super . Oh no hang on - bah I'm a n00b - how do you compile it in windows, or can you provide a windows binary?


Attached is the program compiled for windows in Dev-C++ (bloodshed) GCC compiler.

Windows CMD does not like the piping though, maybe I am using a wrong command?

Code: [Select]
type in.dsd | dsd2pcm 1 M 24 > test.pcm
The process tried to write to a nonexistent pipe.


Code: [Select]
type in.dsd | dsd2pcm 1 M 24 | "C:\cmdapps\sox\sox.exe" -t raw -r 352800 -s -3 -c 2 - -r 88200 -b 24 test.wav
The process tried to write to a nonexistent pipe.


Not a big deal to use ubuntu to run this
Title: DSD-2-PCM -- proof of concept
Post by: Kees de Visser on 2009-11-27 08:02:17
There seems to be a growing (niche) market for online sales of hi-res audio. Using an SACD to rip the DSD audio and convert to a pcm format of choice would probably be much easier than sending the hi-res masters from the record company to the online shop.
The problem however I have with this scenario is that the original recording format is not always specified on the SACD. When a 24/44.1 recording e.g. is being released on SACD, ripped for online sales and offered as 24/96 at a premium price, this somehow doesn't seem honest business. Having the surround version available in pcm format without the need to own an SACD player is a good thing though.
Title: DSD-2-PCM -- proof of concept
Post by: 2Bdecided on 2009-11-27 09:59:45
Now back to THIS case about DXD: I am interpreting what seems to be not very widely-known SCIENTIFIC information on a very new digital audio format. All sources of information say that DXD is PCM-like, NOT PCM!!!!
The problem is, unless you've found better sources than me, these sources are just marketing.

e.g. these are sources that also show SACD pulse response being almost infinitely short, while CD is really long (a sinc pulse). This is all-but-nonsense because to get that pulse response from SACD, you have to remove the output filter. If you remove the output filter, you have full scale digital noise - any pulse in there is invisible*. Run this unfiltered signal through an amp and speakers and they'll blow up.

* - so how did they generate these graphs? I can think of three possibilities:

1. They simulated DSD sample frequency with a multibit signal and no noise shaping.
2. They averaged millions of "real" 1-bit DSD "pulse" signals in the multi-bit or floating point domain to remove the noise so that you can actually see the pulse.
3. They drew it with a pen.


DXD is 8fs 24-bit. Assuming it has some kind of anti-alias filter (it clearly does), then it's just PCM generated from an oversampled ADC with some noise shaping.

When they say "PCM-like", what they mean (but would never dream of saying) is that "perfect" PCM at that rate could have a 176.4kHz bandwidth, and 144dB SNR across that entire bandwidth - whereas DXD has:
1. a gentler filter and hence narrower usable bandwidth (that's fine - that could still be called PCM -and would be a fine way of generating 8fs PCM - no need for brick wall filters when there's so much leeway); and
2. far higher noise - especially at higher frequencies. How much? If you ADC straight to DXD, that depends on the choice of ADC architecture (but it's still PCM at the output). If the DXD is converted from DSD, then the noise depends on the original DSD "encoding", and the conversion parameters. It's still PCM at the output - but it's really messy noisy PCM in this case - if you looked at the waveform (for example) there would be plenty of the DSD noise still intact within the DXD signal - so even in silent parts the waveform amplitude would never drop below -60dB - despite DXD allowing it to drop to -144dB (with dither) or -infinity dB (i.e. a stream of digital zeros without dither).

So in essence PCM-like means "like PCM, but with far more high frequency noise".

So, bad PCM really!

It doesn't really matter. What they've done, ten years too late, is catch up with good converter design. When they designed DSD, the idea was to take the output of the best converter available at that time. Unfortunately, by the time they launched DSD, 1-bit converters weren't the "best" - the best was something like a 5-bit Ring DAC or ADC. Now DXD can hold the data from such a converter with very little processing or theoretical degradation.

But as far as human ears are concerned, the DVD-A formats already did that. Most here would claim the CD formats already did that too, except in some extreme and almost irrelevant circumstances.

Cheers,
David.
Title: DSD-2-PCM -- proof of concept
Post by: smack on 2009-11-27 10:00:50
Windows CMD does not like the piping though, maybe I am using a wrong command?

Windows does a LF <-> CR/LF conversion on the stdio streams. You need to modify the program and set std::cin and std::cout to binary mode in order to prevent the data corruption caused by that conversion.

At the moment I can't provide you with the exact C++ code for this patch, sorry. Try an internet search, it's a very common Windows programming problem...
Title: DSD-2-PCM -- proof of concept
Post by: rpp3po on 2009-11-27 11:55:17
Now, I want to get to the bottom of this, because I'm not sure if "it can afford to have a more relaxed anti-alising filter" means it DOES have a more relaxed anti-alising filter than PCM. I READ somewhere that yes, it DOES, but can't find that info since DXD is so obscure and new.


PCM just means pulse code modulation. An analog waveform's amplitude is captured as discrete symbols at regular intervals. But "PCM" doesn't imply any specific form of antialiasing filter! And so it just does not make sense to say something would be different from PCM, because of a "more-relaxed" antialiasing filter!

When you want to tune PCM for a specific kind of application, the selection of a matching antialiasing filter is totally normal. You decide wether you want to max out frequency response (bandwidth) or impulse response within the limits of a chosen sample rate. Either a filter with a steep or gentle slope is chosen accordingly. There are even applications where the filter can be omitted entirely.

The term "like PCM" just refers to common misconceptions in the audio community. Since the world conquering success of the Audio CD, people associate the underlying technology with brick wall filtering. The Audio CD's Nyquist frequency is relatively close to the human-audible frequency range and so steep filters are commonly used to max out available bandwidth.

But different (gentler sloped) filters have always been used, especially for higher sample rate content, even for plain Redbook. That's nothing specific to DXD.
Title: DSD-2-PCM -- proof of concept
Post by: 2Bdecided on 2009-11-27 12:00:06
An analog waveform's amplitude is captured as discrete symbols at regular intervals.
I guess that's why it's "PCM-like" - there's so much noise that a single given discrete symbol (sample!) can have almost no relationship to the original analogue waveform's instantaneous amplitude.

It's a fair distinction they're trying to make - it's just that the terminology is wrong - it is still PCM - just like SBM or noise shaped CDs are still PCM.

I guess an honest description, e.g. "noisy PCM" wouldn't look so good in the marketing!

Cheers,
David.
Title: DSD-2-PCM -- proof of concept
Post by: .halverhahn on 2009-11-27 14:34:55
DXD is PCM - just with a bunch of noise above 48kHz. You pay storage space for saving noise.

I've downloaded from http://www.2l.no/hires/index.html (http://www.2l.no/hires/index.html) the Divertimenti Stereo DXD (344 MB) (http://www.lindberg.no/hires/test/2L50SACD_tr1_DXD_stereo.zip) and created a spectrogram.

The DXD 24Bit/352.8kHz
(http://www.hdimage.org/images/56z1nlo7b58oreyakrkc_thumb.png) (http://www.hdimage.org/viewer.php?file=56z1nlo7b58oreyakrkc.png)

The 24Bit/96kHz version (downsampled with Audition from DXD)
(http://www.hdimage.org/images/rigmn9853ver71rcwno9_thumb.png) (http://www.hdimage.org/viewer.php?file=rigmn9853ver71rcwno9.png)

Title: DSD-2-PCM -- proof of concept
Post by: rpp3po on 2009-11-27 16:47:46
Wow! The DXD track is certainly nothing Bruce Wayne should playback in his Batcave. The amount and intensity of ultrasonic noise is insane!
Title: DSD-2-PCM -- proof of concept
Post by: krabapple on 2009-11-29 02:56:05
The white paper, and other sources on the internet, say that because it has an ultra-high sampling rate, "it can afford to have a more relaxed anti-alising filter" (and thus, characteristically, has a closer pulse response and frequency response to DSD).


Any high-SR PCM allows for more relaxed filtering compared to Redbook.

DSD (1bit/2.82MHz) was initially meant as an archiving format, not a production format.  Then some genius decided consumers should be offered DSD in a delivery format (SACDs). But you can't do common production moves -- e.g., mixing, edits-- in DSD.  You have to go to PCM.  Hence kludges like intermediate conversion to DXD (i.e., 24bit or 32bit/352.8kHz PCM) by Pyramix, or  Sadie's 'DSD-Wide'  (waggishly called 'PCM Narrow') which is 8bit/2.82Mhz PCM, followed by final (re)conversion to DSD.
Note that all of the SRs are integer multiples of Redbook's 44.1 (1fs).  DSD (8fs) itself was designed to be easily transcoded to PCM in the first place. 

The final amusing aspect to all this is that Scarlet Book spec recommends that SACD players incorporate some low-pass filtering (either 50 kHz or 100kHz) to lessen the amount of ultrahigh frequency content the downstream gear would have to (perhaps badly) deal with.

Btw, DXD is not 'new', it's been around since at least early 2004 (http://mixonline.com/mag/audio_merging_technologies_pyramix/). DSD-Wide's been around even longer. (http://www.aes.org/e-lib/browse.cfm?elib=9998)
Title: DSD-2-PCM -- proof of concept
Post by: spoon on 2009-11-29 19:54:29
As the noise is constant this shows the levels quite well:

(http://www.dbpoweramp.com/images/misc/sacd-noise.png)

Especially for all those porpoises out there:

Animal hearing ranges (http://www.lsu.edu/deafness/HearingRange.html)

Anyone know the filter design in SACD players?
Title: DSD-2-PCM -- proof of concept
Post by: spoon on 2009-11-29 21:51:39
Quote
The final amusing aspect to all this is that Scarlet Book spec recommends that SACD players incorporate some low-pass filtering (either 50 kHz or 100kHz) to lessen the amount of ultrahigh frequency content the downstream gear would have to (perhaps badly) deal with.


Makes interesting reading:

http://grad.uprm.edu/tesis/latorrenavarro.pdf (http://grad.uprm.edu/tesis/latorrenavarro.pdf)

Quote
In addition, Sony claims to have developed a decimation procedure, named Super Bit Mapping Direct Down conversion, which uses a “super-power one-stage” FIR digital filter/noise shaper with 32,639 taps to down-convert the DSD signal into a CD quality signal in a single stage [1]. This allows for a CD with the highest possible audio quality.

According to manufacturers, DSD can offer a frequency response from DC to 100 kHz and a residual noise power of -120 dB thanks to its 5th-order noise shaping filters [1]. However, given this noise shaping technique, the residual noise power is not constant throughout the signal bandwidth. By using noise-shaping filters of higher order, it is possible to increase the resolution in the audio band at the expense of resolution at exceedingly (inaudible) high frequencies. These results are valid however only for static, non-transient signals. Transient signals will have poor resolution in a one-bit system. If the signal does not endure for a long enough time, the noise shaper of the one-bit system will not minimize the error.

As indicated by its proponents, DSD offers the advantage of eliminating the decimation and interpolation processes necessary in PCM modulation, thus preventing additional-unnecessary re-quantization noise from polluting the signal. In the SACD "Scarlet Book" Sony and Philips mandate the use of a 100 kHz low-pass filter in SACD mastering so that when the playback volume at standard DSD level is equivalent to 100W, the noise component "outside the audible sound spectrum" is 1W or less. In addition, SACD players must low-pass-filter their analog output above 50 kHz.


Title: DSD-2-PCM -- proof of concept
Post by: krabapple on 2009-11-30 05:33:02
Quote
The final amusing aspect to all this is that Scarlet Book spec recommends that SACD players incorporate some low-pass filtering (either 50 kHz or 100kHz) to lessen the amount of ultrahigh frequency content the downstream gear would have to (perhaps badly) deal with.


Makes interesting reading:

http://grad.uprm.edu/tesis/latorrenavarro.pdf (http://grad.uprm.edu/tesis/latorrenavarro.pdf)


Interesting listening tests, though also a bit curious.  Not sure how someone managed to get 81.5% correct in a 16-trial listening test of 24/88.2-->redbook-->24/88.2 vs original 24/88.2, as his Table 1 shows -- not because I expect it should be hard to do (though I do) but because the math doesn't work:
13/16 = 81.25%  correct (p = 0.011)
14/16 = 87.50%  correct (p = 0.002)

So how does one get 81.5% correct?

His threshold for calling a non-null result seems to be p<0.01,  by which criterion one, not two as he says, listeners could tell the difference. Or did I miss something? I also assume (because the author used Audition), but do not know for sure (since he didn't say so), that proper dithering was performed during downconversion.  And as always a later retest of the 'best' listeners would have been nice, to see if their results were a fluke. 

Finally, my experience with audiophile naysayers suggests they would argue from the other side: namely that using headphones limited to 22 kHz for recordings with a 44 kHz bandwidth cripples the test.


Title: DSD-2-PCM -- proof of concept
Post by: spoon on 2009-12-01 16:49:59
Based on Sebastians good work I have wrapped the decoder in to a dBpoweramp decoder (with a few enhancements):

http://forum.dbpoweramp.com/showthread.php?p=94899#post94899 (http://forum.dbpoweramp.com/showthread.php?p=94899#post94899)

The DFF header is read to extract sample rate, channel count and if the file is uncompessed, also only the data chunk is read. Resampling takes place by default with SSRC to 88KHz (with the option to change).
Title: DSD-2-PCM -- proof of concept
Post by: kode54 on 2009-12-01 18:55:28
@spoon: I presume you modified the stage 1 filter to reverse the bit order, since DSDIFF is most-significant-bit first.
Title: DSD-2-PCM -- proof of concept
Post by: spoon on 2009-12-01 19:15:47
I thought it was a command line option on dsd2pcm?
Title: DSD-2-PCM -- proof of concept
Post by: krabapple on 2009-12-02 05:56:28
This is all peachy for those recording DSD files or tapping into their SACD player DACs, but could one of you gurus please build an SACD ripper for the rest of us?  Thanks.
Title: DSD-2-PCM -- proof of concept
Post by: spoon on 2009-12-02 08:55:01
I might be wrong, but I do not think there are any PC compatible drives which can read the SACD layer - I know Sony did a laptop once which could write them. Hence why people are resorting to tapping into the binary data stream inside a SACD player.
Title: DSD-2-PCM -- proof of concept
Post by: Martel on 2009-12-02 09:35:26
Quote
There are three types of SACDs[9]:

    * Hybrid: The most popular of the three types, hybrid discs include a Red Book layer compatible with most ordinary Compact Disc players, dubbed the "CD layer," and a 4.7 GB SACD layer, dubbed the "HD layer." [10]
    * Single-layer: Physically a DVD-5 DVD, a single-layer SACD includes a 4.7 GB HD layer with no CD layer.
    * Dual-layer: Physically a DVD-9 DVD, a dual-layer SACD includes two HD layers totaling 8.5 GB, with no CD layer. It enables nearly twice as much data to be stored, but eliminates CD player compatibility. This type is rarely used.


There's still some hope to modify a DVD drive firmware so it can at least recognize the media and then use some sort of low-level raw bit reading.
Title: DSD-2-PCM -- proof of concept
Post by: .halverhahn on 2009-12-02 10:38:38
Just for your information: Wheatus is offering The Lighting EP (http://www.wheatus.com/) as DSD download.
Title: DSD-2-PCM -- proof of concept
Post by: 2Bdecided on 2009-12-02 14:11:39
Just for your information: Wheatus is offering The Lighting EP (http://www.wheatus.com/) as DSD download.


Quote
DSD... This is as good as vinyl, or some say, better. ... They far exceed the quality of DVD and Blu-Ray Audio ... stick it in your PS3 and hit play

...better than 88.2kHz 24-bit FLAC apparently. 


So, to summarise the world as it's seen...
The people who think they want something better than mp3 is small.
The people who want something without loudness-wars-style clipression is small.
The people who want something better than a good CD is even smaller.

...but for that minority, we can now start a new virtual format war - downloaded hi-res FLAC vs downloaded DSD vs downloaded DXD.

Because confusing the heck out of the listener is such a great way to succeed.


...and since we're delivering so many bits, it must be the best you can get - so for most releases we can just forget about surround sound - and we can certainly forget about doing surround sound properly!


Yet another great way for the audio industry to continue its implosion.

Cheers,
David.

EDIT: the sarcasm is obvious above, isn't it? I mean, I don't need to go through and add a "  " to the end of every line, do I?
Title: DSD-2-PCM -- proof of concept
Post by: krabapple on 2009-12-02 16:23:51
I might be wrong, but I do not think there are any PC compatible drives which can read the SACD layer - I know Sony did a laptop once which could write them. Hence why people are resorting to tapping into the binary data stream inside a SACD player.



Yeah, there is that.  And the whole DRM thing.  And the fact that SACD is basically moribund.  But here's to hoping.   
Title: DSD-2-PCM -- proof of concept
Post by: kode54 on 2009-12-07 14:32:37
I thought it was a command line option on dsd2pcm?

I didn't see all those posts, so the only version I knew about was the original Java code, which only supported least significant bit first.
Title: DSD-2-PCM -- proof of concept
Post by: vincefalks on 2009-12-07 16:55:12
Ok finally my warning was lifted after a little situation was addressed  .....


Thanks for your information (2Bdecided and rpp3po). Very much appreciated. That's what I'm here for, I got a lot to learn, and I appreciate you sharing your knowledge, which should never be discouraged here (within reasonableness ofc - if it's something that's been discussed to death it would be annoying). Someone like me should not be scared to ask questions in general (and usually it's ones based on uncommon topics like DXD which have certainly not been discussed hardly at all before) and I don't feel that way anyway.

The problem is, unless you've found better sources than me, these sources are just marketing.

e.g. these are sources that also show SACD pulse response being almost infinitely short, while CD is really long (a sinc pulse). This is all-but-nonsense because to get that pulse response from SACD, you have to remove the output filter. If you remove the output filter, you have full scale digital noise - any pulse in there is invisible*. Run this unfiltered signal through an amp and speakers and they'll blow up.

* - so how did they generate these graphs? I can think of three possibilities:

1. They simulated DSD sample frequency with a multibit signal and no noise shaping.
2. They averaged millions of "real" 1-bit DSD "pulse" signals in the multi-bit or floating point domain to remove the noise so that you can actually see the pulse.
3. They drew it with a pen.

I'm not getting how the output filter (a low-pass filter in the analog domain) lessens/makes moot the analog-like impulse response of the digital signal feeding it?... And I'm not sure that the pulse response needs to apply to the ultra high frequencies anyway? If you filter out the noise, you still have the narrow pulse response for the audible band, right?

Secondly: Not that it's a substitute for my own thoughts, and not that I'm defending DSD/DXD (trust me, I'm not, but by the same token I'm not on the pcm-ONLY side either, I'm 100% agnostic and investigative), but this reminds me a bit of the AES papers back and forth about DSD like this (http://sjeng.org/ftp/SACD.pdf) and this (http://tech.juaneda.com/en/articles/dasd.pdf)). Scientifically peer-reviewed papers (am I right in saying that? Are these papers not necessarily peer-reviewed by objective scientifically-minded audio engineers?), arguing against each other (if not well then I'd like to remind, not that it's hugely relevant to my main point right now, about these (http://jn.physiology.org/cgi/content/full/83/6/3548) two (http://www.bostonaudiosociety.org/explanation.htm) scientific studies (http://en.wikipedia.org/wiki/Hypersonic_effect) which plainly contradict each other...). I'm not sure this is _just_ a matter of marketing (which yes I acknowledge, and when I see some of it I laugh too), and what the DSD proponents say, vs. the truth. E.g. in the AES paper defending DSD, they have quite an accurate-looking graphs of impulse response. Is this AES article misleading marketing too? It doesn't look like it's hand-drawn to me.

Btw, I'm not saying higher impulse response is important anyway, just that it was there in the first place and that it appears to be higher in DXD as well...

- - - - -

Now to the DXD matter:

Thanks for the info and those spectrograms!

What I wonder, is how much noise 24-bit 352.8kHz "normal" PCM would have (whatever "normal" is), compared to these 2L "DXD" PCM files? And also, would there be a difference in impulse/frequency response?

The question is, is DXD just a marketing term, and there’s no strict guidelines on what can be called DXD, or does DXD actually have a "format specification" (so to speak), governing exactly what sort of anti-aliasing filter it must have (to be a true DXD encoded signal)? This is why I questioned the claim that a 24-bit 352.8kHz output file from DSD2PCM is a "DXD file".

Of interest is also whether the architecture of the ADC in question has an effect on how much noise there will be....Not that these "optimal" ADCs in the pyramix, AX24 etc DAWs produce low-noise 352.8kHz files (lol). But I once read that the higher the sampling rate, or at least when you start to go above 96kHz, some noise/distortion starts to occur - but that there have however been "advances" in high sampling rate ADC architecture whereby this noise is somewhat reduced - eliminating some past criticisms of 192kHz ADCs. And that the AX24 (one of the few DXD-capable ADCs) is one of those ADCs. Is this correct?

So in the end, the question is whether (true) DXD can only be generated from specific alti-alias settings which match that in the architecture of DXD ADCs manufactured by Digial Audio Denmark (afaik they're all made by the same company, just re-branded into the other DAWs).

Any high-SR PCM allows for more relaxed filtering compared to Redbook.

DSD (1bit/2.82MHz) was initially meant as an archiving format, not a production format. Then some genius decided consumers should be offered DSD in a delivery format (SACDs). But you can't do common production moves -- e.g., mixing, edits-- in DSD. You have to go to PCM. Hence kludges like intermediate conversion to DXD (i.e., 24bit or 32bit/352.8kHz PCM) by Pyramix, or Sadie's 'DSD-Wide' (waggishly called 'PCM Narrow') which is 8bit/2.82Mhz PCM, followed by final (re)conversion to DSD.
Note that all of the SRs are integer multiples of Redbook's 44.1 (1fs). DSD (8fs) itself was designed to be easily transcoded to PCM in the first place.

The final amusing aspect to all this is that Scarlet Book spec recommends that SACD players incorporate some low-pass filtering (either 50 kHz or 100kHz) to lessen the amount of ultrahigh frequency content the downstream gear would have to (perhaps badly) deal with.

Btw, DXD is not 'new', it's been around since at least early 2004. DSD-Wide's been around even longer.

DXD in the end, is not meant as an editing format for DSD recordings, but as an original master recording format...

They like to record DXD for SACD production because it has almost the same impulse response and frequency response to DSD (within the guidelines of what is "good enough" to them - they say the benefits of DXD outweigh the slight inferiority to DSD in the pulse/freq response departments, and that it sounds better anyway...:|).

And when you compare DXD to PCM/DSD, it IS quite new. Especially in terms of exposure, it's very "new". That's what I meant there.
Title: DSD-2-PCM -- proof of concept
Post by: Martel on 2009-12-07 17:26:01
A (square analog) pulse has an infinitely wide spectrum composition. If you cut off the higher frequencies, the edges of the pulse will start to curve and oscillate.
Title: DSD-2-PCM -- proof of concept
Post by: krabapple on 2009-12-07 17:26:30

Any high-SR PCM allows for more relaxed filtering compared to Redbook.

DSD (1bit/2.82MHz) was initially meant as an archiving format, not a production format. Then some genius decided consumers should be offered DSD in a delivery format (SACDs). But you can't do common production moves -- e.g., mixing, edits-- in DSD. You have to go to PCM. Hence kludges like intermediate conversion to DXD (i.e., 24bit or 32bit/352.8kHz PCM) by Pyramix, or Sadie's 'DSD-Wide' (waggishly called 'PCM Narrow') which is 8bit/2.82Mhz PCM, followed by final (re)conversion to DSD.
Note that all of the SRs are integer multiples of Redbook's 44.1 (1fs). DSD (8fs) itself was designed to be easily transcoded to PCM in the first place.

The final amusing aspect to all this is that Scarlet Book spec recommends that SACD players incorporate some low-pass filtering (either 50 kHz or 100kHz) to lessen the amount of ultrahigh frequency content the downstream gear would have to (perhaps badly) deal with.

Btw, DXD is not 'new', it's been around since at least early 2004. DSD-Wide's been around even longer.


DXD in the end, is not meant as an editing format for DSD recordings, but as an original master recording format...


DXD in the beginning, was created because most editing in the digital domain was impossible in DSD.  Using it directly as a recording format instead of going form DSD to DXD in production is an obvious step since it removes one transformation.  But the primary reason for its use instead of DSD is that it allows editing while more closely approximating DSD than, say 196 kHz PCM.  It can be easily upsampled to DSD for SACD releases.

Title: DSD-2-PCM -- proof of concept
Post by: 2Bdecided on 2009-12-07 17:33:05
I'm not getting how the output filter (a low-pass filter in the analog domain) lessens/makes moot the analog-like impulse response of the digital signal feeding it?... And I'm not sure that the pulse response needs to apply to the ultra high frequencies anyway? If you filter out the noise, you still have the narrow pulse response for the audible band, right?
Time and frequency are inextricably linked. The pulse length is inversely proportional to the bandwidth. The pulse that's shown for CD - that's the shortest pulse you can get if you filter out everything beyond the audible band. Or, to put it another way, that is a "narrow pulse response for the audible band".

If you remove high frequencies, the pulse response is longer / slower / fatter.


Quote
...Are these papers not necessarily peer-reviewed by objective scientifically-minded audio engineers? ...
No. AES conference papers are not peer reviewed. They don't even ask to see the paper before accepting you (just the abstract).

btw, there was a typo in you URL - the pro DSD paper was...
http://tech.juaneda.com/en/articles/dsd.pdf (http://tech.juaneda.com/en/articles/dsd.pdf)

The graph there (figure 9) seems real. The text on the previous page explains it carefully, and I'm fairly sure I would get the same if I repeated the simulation.

It compares a reasonably sharp (but not brick wall) symmetric (linear phase) FIR filter with a gentle, possibly not symmetric filter.

The graph clearly shows the noise of DSD that gets through the filter. The noise is about 30dB down, but still easily visible. A 30dB SNR is nothing to be proud of.

The text says "as the noise floor contains only high frequency components which are uncorrelated with the audio, they are not perceptible."

The 48kHz PCM audio contains "ringing at a -30 dB level approximately 1 ms before the click, which is very audible."

So ultrasonic noise is inaudible, while ultrasonic ringing is audible?! What a strange conclusion - one without a shred of psychoacoustic evidence to back it up. No psychoacoustic theory to support it. No listening tests to verify it.


Worse still, with a 192kHz sampled system, you could make the filter ringing far less severe than what is shown - and of course, you'd never have the problem of ultrasonic noise.




More generally, the pro-DSD paper was produced by someone employed by a company selling DSD, while the anti-DSD paper was produced by academics.

The anti-DSD paper is technically sound, from two fantastically well respected researchers in the field of digital audio. (The author of the pro-DSD paper is also otherwise well respected AFAIK).

The authors of the anti-DSD paper would readily admit that all the artefacts they reveal should be inaudible - but since the benefits of DSD should also be inaudible, that's hardly an excuse!


Quote
these (http://jn.physiology.org/cgi/content/full/83/6/3548) two (http://www.bostonaudiosociety.org/explanation.htm) scientific studies (http://en.wikipedia.org/wiki/Hypersonic_effect) which plainly contradict each other...)
Already discussed ad infinitum here on HA.

Quote
What I wonder, is how much noise 24-bit 352.8kHz "normal" PCM would have (whatever "normal" is), compared to these 2L "DXD" PCM files?
If you restrict your self to real world signals, it will have as little noise as the most noise-free signal you can find. Theoretical signals: -144dB FS. With a practical converter, it'll have the noise of the converter - assuming the quietest real world signal will come from short-circuiting the inputs of the converter with copper wire.

This isn't a silly answer. Even a single resistor "has" more noise than a 24-bit digital audio signal. It really is overkill.

Cheers,
David.
Title: DSD-2-PCM -- proof of concept
Post by: spoon on 2009-12-08 09:21:25
Did anyone manage to decode a .dsf file? (such as one of the linked wheatus ones?).
Title: DSD-2-PCM -- proof of concept
Post by: BOBCHEWIE on 2010-01-03 11:14:11
Raw DSD means saving about 3 GB per 70 minute stereo album. Kind of a waste when you can save 48kHz files, that should perfectly* preserve the 0-22 kHz band, and only need about 475 MB (FLAC). That's over 2.5 GB wasted, not for discarded but inaudible recorded information but plain quantization distortion, added by an inferior form of digitalization. Why save 2.5 GB of garbage per album? Has there ever been just one solid positive blind test for DSD?

* talk about differences of -110db or lower

ok i have idea lets make or convert our audio to 11khz mono and knock it into mp3 format..after all, its about quantity over quality isnt it?
the next time i read an article that tells me the audio customers arent interested in quality and the SACD /DVD Audio format is dead ..i will
scream, have a hissy fit and take my ball back...why the heck do we have to put up with this 'anti hires' propaganda all the time..what ?so that el cheapo music company can keep on shovellng their crappy junk music in mp2.5 format at us?
Title: DSD-2-PCM -- proof of concept
Post by: BOBCHEWIE on 2010-01-03 12:33:05
This is all peachy for those recording DSD files or tapping into their SACD player DACs, but could one of you gurus please build an SACD ripper for the rest of us?  Thanks.



two methods..both are hard work..(1) tapping in binary stream at 88.khz to pcm convert (2) analogue transfer ie re record all the channels FL FR, CEN LFE, LS RS as stereos and recombine (in sync) back into surround (its all done by ear mate and fine tuning) record all 3 stereos front, centre,rear at 92khz 24bit then save out as wma ot wave or 6 mono wavs, then convert to mlp and make dvd audio out of...or oversample at 192khz 24bit all 3 stereos and downsample to 96/24 and yes i did save out a huge 192khz 24bit 5.1 wave file that was HUGE and vlc player played it back with no fuss...also if anyone is interested flac supports 192/24 5.1 channels too and a wee bit small in size than wav...
Title: DSD-2-PCM -- proof of concept
Post by: rpp3po on 2010-01-03 13:15:03
scream, have a hissy fit and take my ball back...why the heck do we have to put up with this 'anti hires' propaganda all the time..


I don't think anybody is interested in your opinion here. Deliver some facts or keep it to yourself. It's the hires propagandists who could not deliver a single, time-synced, level-matched double blind test result where anybody, including Bob Katz, would have been able to differentiate a hires track from a high quality 16bit/44.1kHz mixdown.
Title: DSD-2-PCM -- proof of concept
Post by: Axon on 2010-01-03 13:22:12
Raw DSD means saving about 3 GB per 70 minute stereo album. Kind of a waste when you can save 48kHz files, that should perfectly* preserve the 0-22 kHz band, and only need about 475 MB (FLAC). That's over 2.5 GB wasted, not for discarded but inaudible recorded information but plain quantization distortion, added by an inferior form of digitalization. Why save 2.5 GB of garbage per album? Has there ever been just one solid positive blind test for DSD?

* talk about differences of -110db or lower

ok i have idea lets make or convert our audio to 11khz mono and knock it into mp3 format..after all, its about quantity over quality isnt it?
the next time i read an article that tells me the audio customers arent interested in quality and the SACD /DVD Audio format is dead ..i will
scream, have a hissy fit and take my ball back...why the heck do we have to put up with this 'anti hires' propaganda all the time..what ?so that el cheapo music company can keep on shovellng their crappy junk music in mp2.5 format at us?

I don't think "quality" means what you think it means.

If one cannot tell apart SACD from MP3 in a blind test, then as far as the parameters of that test are concerned, that does not mean that choosing MP3 means sacrificing quality. It means that SACD is equal in quality to MP3. It does mean sacrificing other things, but audio quality is not necessarily among them.
Title: DSD-2-PCM -- proof of concept
Post by: Martel on 2010-01-04 08:53:59
...why the heck do we have to put up with this 'anti hires' propaganda all the time...

Quote from: Wikipedia link=msg=0 date=
Propaganda is a form of communication aimed at influencing the attitude of a community toward some cause or position. As opposed to impartially providing information, propaganda in its most basic sense, presents information primarily to influence an audience. Propaganda often presents facts selectively (thus lying by omission) to encourage a particular synthesis, or uses loaded messages to produce an emotional rather than rational response to the information presented.
Which part of this describes what HA community is doing? Last time I checked, people here demanded (verifiable) evidence to support one's claims. I guess it's the other way around in your case (hi-res propaganda).
Title: DSD-2-PCM -- proof of concept
Post by: udauda on 2010-01-04 12:39:10
I wonder, how come Pro-DSD never comes up with a solid study like this:
DVD-A versus SACD (http://old.hfm-detmold.de/eti/projekte/diplomarbeiten/dsdvspcm/aes_paper_6086.pdf)
Title: DSD-2-PCM -- proof of concept
Post by: rpp3po on 2010-01-04 13:31:55
Excellent paper, thanks!
Title: DSD-2-PCM -- proof of concept
Post by: krabapple on 2010-01-08 21:05:57
I remember this one from a few years back....I forget whether the full version was ever published or not; the link to the master's thesis appears dead.  Very interesting and mostly thorough work ...

But regarding the four out of 145 subjects who scored significantly better than chance on their first tests:

"All four of these tests occurred within the final four
days of testing. By that point the testing schedule was
full, so unfortunately these individuals could not be
brought back for follow-up verification tests."

Grr. I hate when this happens!
Title: DSD-2-PCM -- proof of concept
Post by: ElfeJoyeux on 2010-03-11 21:34:26
Hello,

I just discovered this awesome topic during some googling. Let me explain : I bought a hybrid SACD. I can listen to the CD dayer without any problem. I recently noticed that the disk is damaged, as shown on this picture (http://a4.img.v4.skyrock.net/a4e/nicourto/pics/2771377898_1.jpg). So before it's totally broken, I'd really like to extract the SACD part (for the day I'll buy a 5.1 sound system). I'm really annoyed because it's a very rare disk (only sold during 2 weeks because the band wasn't satisfied by the songs... so it's now impossible to buy this disk).

Thanks to SebastianG, I know I can convert the extracted datas to PCM (then FLAC or anything else).

The question is now : how to extract the datas. I have no SACD player, and know no one who owns one. And I don't want to buy one just for a single use...
- is there a way to use an old PS3 for this ?
- is there here someone who successfully extracted a SACD datas, and who is kind enough to do this for my disk ? (I can send it worldwide and pay for you to send it back to me  )

Thanks !
--
Cyril
Title: DSD-2-PCM -- proof of concept
Post by: Hobbit13 on 2010-07-19 10:48:51
The question is now : how to extract the datas. I have no SACD player, and know no one who owns one. And I don't want to buy one just for a single use...
- is there a way to use an old PS3 for this ?
- is there here someone who successfully extracted a SACD datas, and who is kind enough to do this for my disk ? (I can send it worldwide and pay for you to send it back to me  )

Thanks !
--
Cyril



If you have a PS3, and want a 5.1 rip, you can reflash a 1.0 version of the PS3 firmware. If you then play the SACD, the digital audio out will contain an unencrypted DTS stream, which you can easily capture with a decent sound cart with SP/dif in.

For a high-res digital rip, very few options are available, as you would have know from reading this thread.

Cheers
Hobbit13
Title: DSD-2-PCM -- proof of concept
Post by: Sik_Lescinovid on 2011-11-27 17:28:07
Has anyone so far noticed that when creating a 24 bit /352.8 kHz WAV file using
Code: [Select]
cat input.dff | dsd2pcm 2 m 24 | sox -t raw -r 352.8k -s -3 -c 2 - output.wav

the output file has a loud click at the very beginning lasting for only about 60 samples or so? I also noticed that there seems to be an issue when trying to convert larger files (say a .dff of the whole WYWH album)
which limits the output to only a clip of about 10 minutes or so (I've checked that the conversion doesn't stop due to lack of space or anything like that).

Additionally I wanted to ask if anyone has done any more work on this converter or if there is any more info on this project apart from this thread and the dsdiff plugin for foobar thread?
I'm interested to find out if converting .dff to .wav using dsd2pcm and then downsampling to 24/96 with Saracon yields a better sound than using Saracon's DSD2PCM module, i.e. if less filtered conversions might sound better
than the heavily filtered ones from Saracon.

Title: DSD-2-PCM -- proof of concept
Post by: chi on 2011-11-27 21:55:42
Has anyone so far noticed that when creating a 24 bit /352.8 kHz WAV file using
Code: [Select]
cat input.dff | dsd2pcm 2 m 24 | sox -t raw -r 352.8k -s -3 -c 2 - output.wav

the output file has a loud click at the very beginning lasting for only about 60 samples or so?


Yes. This is due to the DSDIFF file header/metadata being treated as audio by this command line. The length, of course, depends on the size of the header and could be much longer if, e.g., there is a comments chunk in the file. It is also possible that such metadata follows the audio.

Quote
I also noticed that there seems to be an issue when trying to convert larger files (say a .dff of the whole WYWH album) which limits the output to only a clip of about 10 minutes or so (I've checked that the conversion doesn't stop due to lack of space or anything like that).


Does it stop always at exactly the same time, or output file size?
Title: DSD-2-PCM -- proof of concept
Post by: Sik_Lescinovid on 2011-11-27 22:40:31
Has anyone so far noticed that when creating a 24 bit /352.8 kHz WAV file using
Code: [Select]
cat input.dff | dsd2pcm 2 m 24 | sox -t raw -r 352.8k -s -3 -c 2 - output.wav

the output file has a loud click at the very beginning lasting for only about 60 samples or so?


Yes. This is due to the DSDIFF file header/metadata being treated as audio by this command line. The length, of course, depends on the size of the header and could be much longer if, e.g., there is a comments chunk in the file. It is also possible that such metadata follows the audio.


So would it be possible to rewrite the program so that it only converts the data chunk?

Quote
Quote
I also noticed that there seems to be an issue when trying to convert larger files (say a .dff of the whole WYWH album) which limits the output to only a clip of about 10 minutes or so (I've checked that the conversion doesn't stop due to lack of space or anything like that).


Does it stop always at exactly the same time, or output file size?


As it seems right now dsd2pcm is actually working properly, it's SoX which seems to have issues. On my rip of WYWH the dsd2pcm filter gave me a 5.76 GB raw PCM file which when played in SoX with the appropriate parameters showed a length of a bit more than 10 minutes. I now tried my rip of Dire Straits and dsd2pcm gave me a 5.34 GB raw PCM file which showed in SoX a length of a bit more than 8 minutes. Puzzled I opened the raw file with Audacity and the right parameters to discover that actually all 9 tracks of Dire Straits were contained in the raw file (I could only tell from the waveform since Audacity has issues with 352.8 kHz files apparently). So now it seems that SoX can't handle that big a raw PCM file and hence this whole procedure seems unworkable for range rips of an album. Anybody any ideas on how to remedy this?
Title: DSD-2-PCM -- proof of concept
Post by: Wombat on 2011-11-27 22:50:41
I once had a filesize-limit problem with a huge wav and converted it to wavpack before feeding sox. I don´t know if wavpack handles 352.8kHz but it should do fine.
Besdides that i wonder what you want to try to reach? Isn´t there a plugin for foobar for dff? Combined with the sox plugin it should do the same besides the dithering choices.
Title: DSD-2-PCM -- proof of concept
Post by: Sik_Lescinovid on 2011-11-27 22:57:12
I once had a filesize-limit problem with a huge wav and converted it to wavpack before feeding sox. I don´t know if wavpack handles 352.8kHz but it should do fine.
Besdides that i wonder what you want to try to reach? Isn´t there a plugin for foobar for dff? Combined with the sox plugin it should do the same besides the dithering choices.

I figured out how to circumvent the issue. I just had to add --ignore-length before the input filename in SoX, then it processes the raw PCM file as intended. Also the reason I'm trying to do this is because I'm on a Mac and
foobar is hence out of question. Luckily I could easily compile dsd2pcm to work on OS X and now I have an alternative (and faster) converter for PCM which doesn't filter as heavily as Saracon, that way I can experiment to see what sounds better to me. The only issue remaining is the click in the beginning...
Title: DSD-2-PCM -- proof of concept
Post by: Wombat on 2011-11-27 23:14:59
I once had a filesize-limit problem with a huge wav and converted it to wavpack before feeding sox. I don´t know if wavpack handles 352.8kHz but it should do fine.
Besdides that i wonder what you want to try to reach? Isn´t there a plugin for foobar for dff? Combined with the sox plugin it should do the same besides the dithering choices.

I figured out how to circumvent the issue. I just had to add --ignore-length before the input filename in SoX, then it processes the raw PCM file as intended. Also the reason I'm trying to do this is because I'm on a Mac and
foobar is hence out of question. Luckily I could easily compile dsd2pcm to work on OS X and now I have an alternative (and faster) converter for PCM which doesn't filter as heavily as Saracon, that way I can experiment to see what sounds better to me. The only issue remaining is the click in the beginning...

Ah, ok. On a MAC this is different of cause, sorry for not taking this possibility into account.
Title: DSD-2-PCM -- proof of concept
Post by: Sik_Lescinovid on 2011-11-27 23:27:19
Actually screw what I said so far, the resulting .wav file is too big to be handled properly by most software: it always reports the wrong length. Is there any uncompressed audio format out there that does not have this size limit as WAV and AIFF do?
Title: DSD-2-PCM -- proof of concept
Post by: chi on 2011-11-27 23:37:39
So would it be possible to rewrite the program so that it only converts the data chunk?


Yes, that is possible. I hope SoX (git snapshot) will support it directly by next week or so.

Quote
As it seems right now dsd2pcm is actually working properly, it's SoX which seems to have issues. … So now it seems that SoX can't handle that big a raw PCM file and hence this whole procedure seems unworkable for range rips of an album. Anybody any ideas on how to remedy this?


I assume you are using the latest release of SoX, version 14.3.2. There have been improvements regarding large-file support (see this commit (http://sox.git.sourceforge.net/git/gitweb.cgi?p=sox/sox;a=commit;h=e29e9ceb7c25a2d83c09bc8a601de117fc65563c)), but that was after the release of 14.3.2.

Additionally, WAV itself has limited support for files > 4 GB, as it is using only 32 bits for storing size values.
Title: DSD-2-PCM -- proof of concept
Post by: Sik_Lescinovid on 2011-11-28 00:41:49
So would it be possible to rewrite the program so that it only converts the data chunk?


Yes, that is possible. I hope SoX (git snapshot) will support it directly by next week or so.

Quote
As it seems right now dsd2pcm is actually working properly, it's SoX which seems to have issues. … So now it seems that SoX can't handle that big a raw PCM file and hence this whole procedure seems unworkable for range rips of an album. Anybody any ideas on how to remedy this?


I assume you are using the latest release of SoX, version 14.3.2. There have been improvements regarding large-file support (see this commit (http://sox.git.sourceforge.net/git/gitweb.cgi?p=sox/sox;a=commit;h=e29e9ceb7c25a2d83c09bc8a601de117fc65563c)), but that was after the release of 14.3.2.

Additionally, WAV itself has limited support for files > 4 GB, as it is using only 32 bits for storing size values.


Yes I'm using 14.3.2 and have already found out that with --ignore-length I can at least play large raw PCM files and convert them to proper WAV files. The thing that bothers me now is that Saracon won't handle these large WAV files properly when trying to downsample. Ultimately what I want is to be able to convert a .dff of a full album to raw PCM using dsd2pcm, then convert the raw file as quickly as possible to a format that Saracon can work with without errors (currentyl I'm trying FLAC but it's just so much slower than converting the raw file to WAV obviously) and finally downsample the resulting file to a something I like. The reason I want to do this is so that I can compare what the result of the described process sounds compared to Saracon's DSD to PCM conversion. I am well aware that Saracon's DSD to PCM conversion capabilities are regarded as quite good, but I'm interested in what DSD to PCM conversion might sound like if one doesn't filter out as much of the noise as Saracon does. Finally the reason I'm not using Audiogate for the "unfiltered" conversion is that it's downsampling capabilities are quite awful and it doesn't offer anything above 192 kHz output.
Title: DSD-2-PCM -- proof of concept
Post by: Sik_Lescinovid on 2011-11-28 02:08:19
To my surprise I found out that both SoX and Saracon support CAF files, hence I can now easily and quickly to the procedure I described above. I want to thank Sebastian for his great work on dsd2pcm! If additionally it could be changed so that only the data chunk is read from .dff files we would have a great little utility for DSD to PCM conversions on UNIX based systems and maybe even Windows. Coupled with the resampling capabilities of SoX this might be a true alternative to the more expensive options out there.
Title: DSD-2-PCM -- proof of concept
Post by: dvdr on 2011-11-29 15:22:29
Spoon,
which version are you using of SSRC - the "normal SSRC" or the "HD"/high quality SSRC_HD resampling? Are you doing two-pass? In case of "normal": any plans to wrap the HD-version + 2-pass to get better audio quality?
Based on Sebastians good work I have wrapped the decoder in to a dBpoweramp decoder (with a few enhancements):

http://forum.dbpoweramp.com/showthread.php?p=94899#post94899 (http://forum.dbpoweramp.com/showthread.php?p=94899#post94899)

The DFF header is read to extract sample rate, channel count and if the file is uncompessed, also only the data chunk is read. Resampling takes place by default with SSRC to 88KHz (with the option to change).
Title: DSD-2-PCM -- proof of concept
Post by: spoon on 2011-11-29 15:37:49
We use our own compiled version of SSRC, off the top of my head the HQ switch used double + extra filter lengths, I am 99% sure we use doubles as there is no difference in speed on modern processors, did nto include extra filter length.
Title: DSD-2-PCM -- proof of concept
Post by: SebastianG on 2011-12-04 17:00:02
Just as a little status update: I was notified that there is interest in integrating dsd2pcm into SoX. Therefore, I added proper licensing terms ("New BSD") and put the source code on google code here (https://code.google.com/p/dsd2pcm/).

I also received a patch that includes some dsdiff header handling. You'll probably see this one integrated as well as some simple WAV header output which would then remove the click/pop at the beginning and the need th specify the raw format manually in the command line. Maybe I'll even add an optional lowpass filter and some nicely named presets...

Cheers!
SG
Title: DSD-2-PCM -- proof of concept
Post by: Wombat on 2011-12-04 18:27:50
Just as a little status update: I was notified that there is interest in integrating dsd2pcm into SoX. Therefore, I added proper licensing terms ("New BSD") and put the source code on google code here (https://code.google.com/p/dsd2pcm/).

I also received a patch that includes some dsdiff header handling. You'll probably see this one integrated as well as some simple WAV header output which would then remove the click/pop at the beginning and the need th specify the raw format manually in the command line. Maybe I'll even add an optional lowpass filter and some nicely named presets...

Cheers!


Nice to hear. I lately purchased an album online to play around with that format and it was not that easy to get it to the right format feeding sox.
btw. the album i purchhased was coming as *.dsf files that weren´t recognized by dbpoweramp, foobar and others. I had to use Korg to convert this to *.dff
I am pretty new to this and wonder if dff is some kind of container and *.dsf files pure audio files only.

Edit: wrong file endings corrected
Title: DSD-2-PCM -- proof of concept
Post by: SebastianG on 2011-12-05 10:31:19
Nice to hear. I lately purchased an album online to play around with that format and it was not that easy to get it to the right format feeding sox.

In my opinion, if you have the option between PCM (88/16 or 176/8 or higher) and DSD, you should go with PCM as you get more bang for the buck with PCM (higher theoretical quality for less bits).

btw. the album i purchhased was coming as *.dsf files that weren´t recognized by dbpoweramp, foobar and others. I had to use Korg to convert this to *.dff
I am pretty new to this and wonder if dff is some kind of container and *.dsf files pure audio files only.

According to Wikipedia (http://en.wikipedia.org/wiki/Direct_Stream_Digital), "DSF is a stereo-only, simplified form of DFF". Though, I did not yet find any specs. Pointers are welcome!
Title: DSD-2-PCM -- proof of concept
Post by: Wombat on 2011-12-05 13:37:39
In my opinion, if you have the option between PCM (88/16 or 176/8 or higher) and DSD, you should go with PCM as you get more bang for the buck with PCM (higher theoretical quality for less bits).

I know a bit about these things, thanks. I always smile when someone reports the unbelievable better sound of the SACD version that in reality just cam from some PCM master
The recording i purchased is "David Elias - The Window" to purchase at his homepage.
Since the recording was done in pure DSD it shouldn´t be false to buy the DSD release and create versions for my personal use at any format i like.

btw. It is nice to buy something from such a person that marketing himself and cares about customers. He even wrote me an Email (most likely automated) thanking me for the purchase and answered me again about some comments i made. I can´t remember Tom Waits did Email me after i purchased his new Deluxe Edition last week.

At his page he sells the DSD version as ISO file that can be burned and played on the PS3. In this ISO the fiels are in *.dsf format. Maybe you find something about the format on some PS3 info pages.
Title: DSD-2-PCM -- proof of concept
Post by: chi on 2011-12-05 23:29:23
According to Wikipedia (http://en.wikipedia.org/wiki/Direct_Stream_Digital), "DSF is a stereo-only, simplified form of DFF". Though, I did not yet find any specs. Pointers are welcome!


sacd-ripper has the specification: http://sacd-ripper.googlecode.com/svn/trun...ification_E.pdf (http://sacd-ripper.googlecode.com/svn/trunk/docs/DSF_file_format_specification_E.pdf)
It seems Wikipedia is not completely right, as there is a “Channel num” field supporting values from 1 to 6.
Title: DSD-2-PCM -- proof of concept
Post by: SebastianG on 2011-12-07 11:04:07
sacd-ripper has the specification: [...]

Thanks. It seems they also have implemented some of this (at least for writing these streams, I suppose).
Title: DSD-2-PCM -- proof of concept
Post by: Wombat on 2015-09-04 19:09:27
Finaly some code that allows direct dsd support in SoX. http://sourceforge.net/p/sox/mailman/message/34396792/ (http://sourceforge.net/p/sox/mailman/message/34396792/)
Thanks to Måns Rullgård for offering the code! https://github.com/mansr/sox (https://github.com/mansr/sox)
I had some probs getting the compiling enviroment running in Win10 but the dsf to PCM path now works nicely
No idea how the idea feeding the rate function directly differs from Sebastians 8:1 decimation and resampling from there.