Skip to main content

Notice

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

Re: PCM, DSD - Trying to get my head round some basics

Reply #100
Perhaps relevant enough to cause a noticeable difference in calculated playback gain when sent through a broken volume leveler?
I don't know how Arnold made his test but I took Pink Floyd - Wish You Were Here DSD file and converted it to 352800 Hz PCM. This file showed RMS level at -18.39 dB. Filtering away frequencies below 22 kHz showed RMS level for the ultrasonics at -22.28 dB. And after resampling to 44.1 kHz to remove the inaudible sounds RMS level was at -20.68 dB.
At least with this this file and with this much ultrasonic content RMS is not a valid method for loudness matching. Computing ReplayGain for a 44.1 kHz or 48 kHz resampled version gives better results.

Re: PCM, DSD - Trying to get my head round some basics

Reply #101
I've never understood the point of using old analogue recordings which are never going to use more than 13 bits or need a sampling rate greater than 48kHz.

Wasn't this used to try and discredit the Meyer-Moran SACD test?

Re: PCM, DSD - Trying to get my head round some basics

Reply #102
Perhaps relevant enough to cause a noticeable difference in calculated playback gain when sent through a broken volume leveler?
I don't know how Arnold made his test but I took Pink Floyd - Wish You Were Here DSD file and converted it to 352800 Hz PCM. This file showed RMS level at -18.39 dB. Filtering away frequencies below 22 kHz showed RMS level for the ultrasonics at -22.28 dB. And after resampling to 44.1 kHz to remove the inaudible sounds RMS level was at -20.68 dB.
At least with this this file and with this much ultrasonic content RMS is not a valid method for loudness matching. Computing ReplayGain for a 44.1 kHz or 48 kHz resampled version gives better results.
Where might I find that DSD file to try my procedure on?

Re: PCM, DSD - Trying to get my head round some basics

Reply #103
I've never understood the point of using old analogue recordings which are never going to use more than 13 bits or need a sampling rate greater than 48kHz.

Wasn't this used to try and discredit the Meyer-Moran SACD test?

More than try... It was a relevant critical influence on the outcome of the tests.

Meyer and Moran were blindsided as was much as the rest of the audio world. Greisinger had pointed this situation out in a paper he gave at an AES conference in Baniff in 2003, but it just seems to have slipped everybody by. The  PPT of the slides are here:

David Griesinger intermod.ppt from Baniff, 2003

Re: PCM, DSD - Trying to get my head round some basics

Reply #104
@Arnod:

In case you didn't notice these two posts of mine are related:

g=938570 date=1493059974]
(2) Measure the RMS or if no RMS calculation is available, the average value associated with the level of music between the two points in each piece of music.
He should probably lowpass to no greater than the nyquist of the PCM samplerate first.

They were an attempt to address the very real problem faced by the OP in his botched attempt to perform a controlled comparison:
This is not necessarily as easy as you make out. My first post on HAudio was in the ABX section for Foobar, which was making comparisons impossible as ReplayGain wouldn't set the levels between PCM and DSD correctly (possibly due to the noise, but I won't speculate as I get told off for doing that).

So I HAVE tried a proper listening test, and the technology failed me.

Re: PCM, DSD - Trying to get my head round some basics

Reply #105
FYI, my converter ReSampler is a command-line tool which can convert DSD .dsf and .dff files to various PCM formats. (Or if you prefer a graphical interface, use ferocious)



Maybe a bit off-topic but it seems that your software's UI is not DPI-aware. While hi-res audio does no harm to my ears a hi-res monitor does hurt my eyes. The recent Windows 10 Creators Update advocating improvement in UI scaling is a pure joke, I used it for no more than 3 hours and reverted to Windows 7.

Yes, thanks for this. I addressed it in my other thread (so as not to derail this one)


files from the 2L Hires Test-Bench

Back to the topic. Just in case shakeshuck wants to ABX 2L's files.
"Some 2L Hi-Res music samples are either botched or cooked"
https://hydrogenaud.io/index.php/topic,111416.0.html

Ok, Thanks. I wasn't aware of that, but I haven't checked out all of the files. The ones I looked at seemed ok.
I'm away from my audio setup atm, but will review when i get back.

Re: PCM, DSD - Trying to get my head round some basics

Reply #106
Where might I find that DSD file to try my procedure on?
I happened to find it with SACD and DSD Google searches when I was looking for DSD test files to play with. Its legality might be an issue.

I used poor wording in my original post, I did see how you performed your test but I used a different method that matched OP's ABX trial.

Converting the previous Pink Floyd DSD file to 96 kHz PCM leaves majority of the noise shaping noise out. RMS power for this version of the file is -22.68 dB. High passed to 22 kHz shows -61.99 dB for the ultrasonics. 22 kHz lowpass gives the same RMS power as the full file, -22.68 dB. And for Greynol's information, ITU 1770 loudness scanner gives the same loudness value for the full 96 kHz track and the lowpassed one.

 

Re: PCM, DSD - Trying to get my head round some basics

Reply #107
Is in error when the PCM samplerate is 88.2k?

What happens with the old and new algorithms when you take the samplerate up so that a good portion of the noise shaping is still present?


Re: PCM, DSD - Trying to get my head round some basics

Reply #108
Is in error when the PCM samplerate is 88.2k?
What do you mean?

What happens with the old and new algorithms when you take the samplerate up so that a good portion of the noise shaping is still present?
I ran the scan with the original 2Bdecided algorithm and the new ITU one on a few different sample rates. The results are rather strange:

Sample rateITUOriginal
352.8 kHz-3.99 dB-1.98 dB
192 kHz-0.96 dB-3.74 dB
48 kHz-1.47 dB-1.98 dB
44.1 kHz-1.47 dB-2.07 dB
Especially curious how the 192 kHz version gets treated so differently.

Edit: wrong sample rate had slipped in the table.

Re: PCM, DSD - Trying to get my head round some basics

Reply #109
FWIW Here's a little more info:
From the SACD and foobar2000 v1.3.15 - Converted .iso to 32 bit floating point PCM @ 2.8224MHz and used Adobe Audition 3.0 to down sample from that to the below rates (with prefilter quality 999) and then raise the level by 6dB (for SACD's 50% modulation level)

44.1k   -1.47dB
48k      -1.47dB
88.2k   -1.46dB
96k      -1.45dB
176.4k -0.79dB
192k    -0.29dB
352.8k -5.12dB
Raising the 352.8k by 6dB cause a few samples to clip but doing replay gain on the original 50% version got exactly +0.90dB so that didn't cause any problems.

The weirdness at 352.8k is probably explained by the HF noise that a normal SACD player would filter out (with say a 4th or 5th order filter at 50k to 80k)

Here is the FFT of 2:20 to 2:30 from 88.2k, 176.4k and 352.8k:


Re: PCM, DSD - Trying to get my head round some basics

Reply #110
Back to the topic. Just in case shakeshuck wants to ABX 2L's files.
"Some 2L Hi-Res music samples are either botched or cooked"
https://hydrogenaud.io/index.php/topic,111416.0.html

Just getting back to the topic of "Some 2L Hi-Res music samples are either botched or cooked"  - from the few examples I can see in that thread, it seems to be a case of the exact phenomenon I was referring to earlier in this thread:

Quote
..., the group delay caused by the FIR filter used in the conversion may result in the two files not being exactly time-aligned, so care would need to be taken to ensure that they are time-aligned properly,

Using a linear-phase FIR for the Lowpass Filter in the conversion process (which is what is usually used) will inevitably cause a delay, and the delay time will vary depending on the length of the FIR filter used.
The length of the FIR (and therefore the delay time) will vary from one converter to another, and even within the same converter, when the LPF parameters are varied (eg cutoff frequency / transition band / steepness etc).

Therefore, unless I'm mistaken (and always happy to be wrong),  I don't consider slight timing variations in various conversions of the same original material to be evidence of "botching" or "cooking". It is just an inevitable consequence of having a linear-phase FIR filter for anti-aliasing.

Of course, you can avoid the delay by using a minimum-phase FIR, but then you will be introducing phase distortion, and since you will have changed the phase of individual frequency components, your subtraction trick will not work properly.
   



Re: PCM, DSD - Trying to get my head round some basics

Reply #111
That's some extensive testing, tedsmith.
I'm happy to report that Peter seems to finally be adding ultrasound filtering to the foobar2000's ReplayGain scanner. Should improve ABX situation and perhaps even help any real RG user.

Re: PCM, DSD - Trying to get my head round some basics

Reply #112
I'm glad it came up.  I had wondered why all of the sudden my replay gains for DSD started looking different some releases of foobar2000 ago.  I didn't care enough to run it down then (and running the new scanner on all of the SACDs I'd ripped took days and days.)  Also I just wanted to get a known good DSD copy of Pink Floyd's "Wish You Were Here" since you'd mentioned that the provenance wasn't known.

Re: PCM, DSD - Trying to get my head round some basics

Reply #113
Back to the topic. Just in case shakeshuck wants to ABX 2L's files.
"Some 2L Hi-Res music samples are either botched or cooked"
https://hydrogenaud.io/index.php/topic,111416.0.html

Just getting back to the topic of "Some 2L Hi-Res music samples are either botched or cooked"  - from the few examples I can see in that thread, it seems to be a case of the exact phenomenon I was referring to earlier in this thread:

Quote
..., the group delay caused by the FIR filter used in the conversion may result in the two files not being exactly time-aligned, so care would need to be taken to ensure that they are time-aligned properly,

Using a linear-phase FIR for the Lowpass Filter in the conversion process (which is what is usually used) will inevitably cause a delay, and the delay time will vary depending on the length of the FIR filter used.
The length of the FIR (and therefore the delay time) will vary from one converter to another, and even within the same converter, when the LPF parameters are varied (eg cutoff frequency / transition band / steepness etc).

Therefore, unless I'm mistaken (and always happy to be wrong),  I don't consider slight timing variations in various conversions of the same original material to be evidence of "botching" or "cooking". It is just an inevitable consequence of having a linear-phase FIR filter for anti-aliasing.

Of course, you can avoid the delay by using a minimum-phase FIR, but then you will be introducing phase distortion, and since you will have changed the phase of individual frequency components, your subtraction trick will not work properly.

Another common source of time-shifting  involves the use of a hardware resampler. This was the probable cause of the problem with the AIX samples that I have been discussing.  I'm sure you know how this happens - the resampler has its own free-running output sampling clock, and the rest is history. Resampling on the computer is different because the clock is inherent in the process, not the operational environment.

Generally a millisecond or less of time delay that affects all audible channels equally is not a problem. But more than that and an audible echo may be heard at switching points. The tell may not be perceived as a delay, the possibility of being perceived as a difference is greater. 

When it comes to interchannel time delays on the order of 10s of microseconds can be audible, especially when channels are electrically mixed. This showed up in the old days when good DACs cost serious money and were often time-shared among the channels.

Common  things that one hears uttered by people who actually do reliable sensitive properly blinded tests is that the smallest differences are only heard as some uncharacterizable difference that is  nevertheless reliably detectable. As long as people talk about some specific kind of change,  the odds are high that either the difference is relatively large or that  they are imagining, not actually hearing. Of course imaging as opposed to hearing becomes obvious in the statistical analysis.   Once one starts hearing a difference, the reliability of detection usually starts increasing, and high levels of reliability such as 99% confidence generally become doable. 

Listening fatigue usually comes from not really hearing anything, which is why placebophiles complain about it so  much.

Listener training where the technical difference being investigated is gradually reduced from truly obvious to well below levels where we expect to hear something based on standard psychoacoustic guides is probably the best form of listener training.

On occasion I've seen ABX results that are almost an order of magnitude better than what the psychoacoustics text lead me to believe is possible.  I attribute that to the fact that so many psychoacoustics texts are based on the other kind of ABX tests, the ones that date back to the 50's. Not that they are invalid, but that they  seem to be designed to minimize listener training. Minimizing the effects of listener training is reasonable too, when audibility is related to the real world where we mostly only get to hear any particular thing once, and in a complex environment. Listening to recordings is different, because we can and often do listen repetitively and in a very focused and isolated way.

The most common form of cooked samples from 2L is that a lot of their higher sample rate files show evidence of being slavishly resampled from lower sample rate files, and not actually having any signficiant  performance source-related content above say, 70 KHz.  The fraud that hobbled Meyer and Moran for example is still being practiced it seems, just moved up a few octaves.

Re: PCM, DSD - Trying to get my head round some basics

Reply #114
That's some extensive testing, tedsmith.
I'm happy to report that Peter seems to finally be adding ultrasound filtering to the foobar2000's ReplayGain scanner. Should improve ABX situation and perhaps even help any real RG user.

If the files being level-matched are sufficiently similar, then the need for filtering goes away. Differences that total out to be 40 or more dB down would seem to represent a conservative limit.

It seems to me that the level-matched files are very different, even different pieces of music then the level matching would seem to need to be much more  sophisticated.  By that I mean that the side chain processing would need to have spectral shaping that is based on audibility along the lines of Fletcher Munson, perhaps even including the different shapes for different levels.

BTW in my DSD tests the format used for all PCM processing was 24/192.

Re: PCM, DSD - Trying to get my head round some basics

Reply #115
I think these DSD discussions often get confused because IMO there are two different questions and sometimes we end up with a moving target, deliberate or not:

1. CD quality vs. higher res, be it PCM or DSD.
2. DSD vs. higher res. PCM.

#1 is easier to test and if one can't ABX a difference, then #2 is pretty much academic.

I think both have been tested to death, and the outcome can be obtained by searching archives.

Re: PCM, DSD - Trying to get my head round some basics

Reply #116
Bugs aside (in the ABX 2.0 thread, 44.1 vs 48 is mentioned, hence my inquiry about 88.2 vs 96), I suspect the true issue is really quite simple: David's equal loudness filter adequately removes the noise shaping, whereas the hastily adopted (yes I did in fact just say that once again) shiny new little darling pet 1770 doesn't. However, I'm happy Peter can fix this with an ultrasonic filter bandaid. I'll reserve my future grumblings over 1770 to where it matters to me: real issues with real music, rather than esoteric, as a delivery format DSD can be different than PCM for commercially available content, nonsense.

Re: PCM, DSD - Trying to get my head round some basics

Reply #117
Using a linear-phase FIR for the Lowpass Filter in the conversion process (which is what is usually used) will inevitably cause a delay, and the delay time will vary depending on the length of the FIR filter used.
The length of the FIR (and therefore the delay time) will vary from one converter to another, and even within the same converter, when the LPF parameters are varied (eg cutoff frequency / transition band / steepness etc).

Therefore, unless I'm mistaken (and always happy to be wrong),  I don't consider slight timing variations in various conversions of the same original material to be evidence of "botching" or "cooking". It is just an inevitable consequence of having a linear-phase FIR filter for anti-aliasing.

Of course, you can avoid the delay by using a minimum-phase FIR, but then you will be introducing phase distortion, and since you will have changed the phase of individual frequency components, your subtraction trick will not work properly.

I am not familiar with the relationship between filtering and delay, but from what I interpret from your reply, does it mean using a linear phase filter, in general, will introduce such a large amount of time delay?

Since the ABX log from mzil contains SHA checksums and 2L is still providing those files, I downloaded the 2496 file and use SoX to to convert them to 44k. I used the default settings as shown in the screenshot.

I inspected the converted file. As you can see in the screenshots, timing differences are basically nonexistent. (self-convert.png vs 96k.png)

Now, look at 2L's 44k file, the timing differences are so huge that I need to use a different zoom scale to show the differences. (2L 44k zoomout.png vs 2L 96k zoomout.png)

Since you also write your own converter so it should be fair to use your converter as an example. Indeed, your converter does produced some offsets, but the differences is much much smaller than 2L's and I would say negligible in ABX tests. (ferocious 44k zoomout.png)

I made SoundFonts in the past and used resamplers frequently, I did know some sample loops gone bad after resampled and I needed to re-align the loop point, but I never see a resampler can produce such a large offset.

Don't know if mzil is still visiting this forum or not...

Re: PCM, DSD - Trying to get my head round some basics

Reply #118
The delay depends on the length of the filter.  For a steep linear phase filter, the length will be very long, and therefore so will the delay.   For a filter with gradual roll off, the delay can be very short, but the rejection will not be good.  If you don't need good rejection, you can therefore have a relatively low delay (or else you must be willing to give up being linear phase).

This is why I said before that if you want to compare DSD and PCM you have to look carefully at time alignment.  Filters that are likely to be transparent (good image rejection, linear phase) are likely to have long delays 


Re: PCM, DSD - Trying to get my head round some basics

Reply #119
Using a linear-phase FIR for the Lowpass Filter in the conversion process (which is what is usually used) will inevitably cause a delay, and the delay time will vary depending on the length of the FIR filter used.
The length of the FIR (and therefore the delay time) will vary from one converter to another, and even within the same converter, when the LPF parameters are varied (eg cutoff frequency / transition band / steepness etc).

Therefore, unless I'm mistaken (and always happy to be wrong),  I don't consider slight timing variations in various conversions of the same original material to be evidence of "botching" or "cooking". It is just an inevitable consequence of having a linear-phase FIR filter for anti-aliasing.

Of course, you can avoid the delay by using a minimum-phase FIR, but then you will be introducing phase distortion, and since you will have changed the phase of individual frequency components, your subtraction trick will not work properly.

I am not familiar with the relationship between filtering and delay, but from what I interpret from your reply, does it mean using a linear phase filter, in general, will introduce such a large amount of time delay?

Since the ABX log from mzil contains SHA checksums and 2L is still providing those files, I downloaded the 2496 file and use SoX to to convert them to 44k. I used the default settings as shown in the screenshot.

I inspected the converted file. As you can see in the screenshots, timing differences are basically nonexistent. (self-convert.png vs 96k.png)

Now, look at 2L's 44k file, the timing differences are so huge that I need to use a different zoom scale to show the differences. (2L 44k zoomout.png vs 2L 96k zoomout.png)

Since you also write your own converter so it should be fair to use your converter as an example. Indeed, your converter does produced some offsets, but the differences is much much smaller than 2L's and I would say negligible in ABX tests. (ferocious 44k zoomout.png)

I made SoundFonts in the past and used resamplers frequently, I did know some sample loops gone bad after resampled and I needed to re-align the loop point, but I never see a resampler can produce such a large offset.

Don't know if mzil is still visiting this forum or not...


Hey - nice work ! Love it ...

Yes, fair enough - the timing offsets should be relatively small.

I just did an experiment using my converter.
I put a single impulse at 1.0s in a 96kHz file, and downsampled it to 44kHz twice, using two different filter settings
a) Std (shorter FIR)
b) Steep (longer FIR)
... and it seemed to make a 1ms difference !

So, yeah - not sure why the timing difference in 2L's is so large.
Maybe it's more to do with their workflow - they are just busy and in a hurry, so they just select a block of audio in their DAW and trim it - not taking care to make it consistent.

So, if this is the case, I would concede that they probably did botch it  :-[ 
... particularly when you consider that the timing discrepancies are enough to produce tells in ABX tests. I am in agreement there.

Damn nice recordings, though ...

Re: PCM, DSD - Trying to get my head round some basics

Reply #120
The delay depends on the length of the filter.  For a steep linear phase filter, the length will be very long, and therefore so will the delay.   For a filter with gradual roll off, the delay can be very short, but the rejection will not be good.  If you don't need good rejection, you can therefore have a relatively low delay (or else you must be willing to give up being linear phase).

This is why I said before that if you want to compare DSD and PCM you have to look carefully at time alignment.  Filters that are likely to be transparent (good image rejection, linear phase) are likely to have long delays 



Amen

Re: PCM, DSD - Trying to get my head round some basics

Reply #121
The point I don't understand is the SoX plugin can be easily downloaded and checked and by default (see the screenshot setting) it can already give a super beautiful sweep, why there is no delay?

Re: PCM, DSD - Trying to get my head round some basics

Reply #122
It was taken care of in SoX to avoid that delay.
For dsd to PCM there is also the problem for the beginning of files often having a click because the filter has no real data to handle the amplitude of the very first sample when it only has 1 bit of info. (this is my theory based on limited understanding)
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Re: PCM, DSD - Trying to get my head round some basics

Reply #123
Before I am getting more replies, let me make a guess...

Since file conversion is a non-realtime process, so adjustment can always be made afterwards, and SoX made such a correction?

Re: PCM, DSD - Trying to get my head round some basics

Reply #124
David's equal loudness filter adequately removes the noise shaping, whereas the hastily adopted (yes I did in fact just say that once again) shiny new little darling pet 1770 doesn't.
If you look at my short test you see that David's version has values varying all over the place too depending on the sample rate. The 192 kHz file gives entirely different results than the others. 1770-thingie has very stable results until 96 kHz is passed, as shown by tedsmith's extended testing.
It's weird how you are in such a disagreement with the new scanner. I have files from all genres except rap and jazz and I'm pleased with the volume leveling.

Edit: forgot to mention that you can still use the old ReplayGain scanner before libebur128 implementation by manually replacing the foo_rgscan.dll file. You can find the last version in foobar2000 v1.1.5

The point I don't understand is the SoX plugin can be easily downloaded and checked and by default (see the screenshot setting) it can already give a super beautiful sweep, why there is no delay?
Any resampler could compensate for the delay. It's just a matter of dropping the extra silent samples.