• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,700
Location
Hampshire
Is this the same one you used to encode the DSD file? If yes, could you paste the same cmd parameters for encoding?
It's compiled from the same source code.

To create the DSD file, I first upsampled the original in Octave (Matlab would also work) using the interpft function. This does an FFT on the entire file, so it's as close to a perfect filter as you can get. I saved the result as 32-bit float and converted it to DSD using this command:
sox in.wav out.dsf sdm -f clans-8 -n 32 -t 32

For the conversion back to PCM, I again used Octave and an FFT on the entire file.

The sox resampler would, even with the best settings, have a transition band of a kilohertz or so, and since the input was white noise, this would have ruined the Diffmaker figures.

Some might say I cheated. I disagree. The challenge was to show that DSD can encode anything 16-bit PCM can. It can, but it's bloody inconvenient.
 

Esotechnik

Member
Joined
Mar 9, 2019
Messages
72
Likes
5
Location
Russia
What century are you in?
SACD format is older, than my PC & OS.
I reboot to x64 (without tascam, korg, weiss, some old hardware, etc), convert dsf to dff with sox x64 but see appcrash:
name APPCRASH
appl: sox.exe
vers: 0.0.0.0
time: 5f6a2a9e
name: sox.exe
vers: 0.0.0.0
time2: 5f6a2a9e
expt: c000001d
offset: 000000000005e165
OS: 6.3.9600.2.0.0.272.7
add1: 31b3
add2: 31b390f3051861a6753416fb8d5730b9
add3: 6d6a
add4: 6d6a22c833a6a9fd0977dc52956aa79c

I convert dff in tascam editor (x86) to wav and diffmaker says:
parameters: 333,2usec, 0,000dB (L), 0,000dB (R)..Corr Depth: 107,3 dB (L), 107,0 dB (R)
(ENOB=17)
But mathlab:
Crest factor Q = 11.2681 dB
Autocorrelation time = 6.25e-05 s (not null)

Deltawave with same files:
Correlated Null Depth=37,52dB [37,84dBA] - why??
 

Attachments

  • deltaw_48-16_dsd_48-24bit.txt.zip
    1.4 KB · Views: 95
Last edited:

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,692
It's compiled from the same source code.

To create the DSD file, I first upsampled the original in Octave (Matlab would also work) using the interpft function. This does an FFT on the entire file, so it's as close to a perfect filter as you can get. I saved the result as 32-bit float and converted it to DSD using this command:
sox in.wav out.dsf sdm -f clans-8 -n 32 -t 32

For the conversion back to PCM, I again used Octave and an FFT on the entire file.

The sox resampler would, even with the best settings, have a transition band of a kilohertz or so, and since the input was white noise, this would have ruined the Diffmaker figures.

Some might say I cheated. I disagree. The challenge was to show that DSD can encode anything 16-bit PCM can. It can, but it's bloody inconvenient.
Thanks. I just want to try your SoX with other files I have, so would like to know the recommended parameters.
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,692
Speaking of DeltaWave, or null test in general, for example, here are two files with a simple tone and they look pretty similar in DeltaWave, but no matter what settings I use I can never get a reasonable null depth figure or DF Metric. The generation of these files are totally unrelated to white noise, DSD and resampling. @pkane could this situation be improved?

dwave.png
 

Attachments

  • tone.zip
    445.5 KB · Views: 97

AnalogSteph

Major Contributor
Joined
Nov 6, 2018
Messages
3,334
Likes
3,278
Location
.de
Speaking of DeltaWave, or null test in general, for example, here are two files with a simple tone and they look pretty similar in DeltaWave, but no matter what settings I use I can never get a reasonable null depth figure or DF Metric. The generation of these files are totally unrelated to white noise, DSD and resampling. @pkane could this situation be improved?

View attachment 84425
That's a mean phase shift. I tried to match these manually but could only get a -61 dB match in Audacity even after upsampling to the highest sample rate it would support, an arbitrary 1000000 Hz (maybe I should update it, I've still got 2.0.4 from who knows when on here).

That being said, arbitrary sub-sample delays are very much a thing in real life - you never know in analog recording. So those are about the least you'd want to have covered when doing deltas.
 

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,626
Likes
10,202
Location
North-East
Speaking of DeltaWave, or null test in general, for example, here are two files with a simple tone and they look pretty similar in DeltaWave, but no matter what settings I use I can never get a reasonable null depth figure or DF Metric. The generation of these files are totally unrelated to white noise, DSD and resampling. @pkane could this situation be improved?

View attachment 84425

I'll take a look, but the fact that fit quality is poor means the timing error/clock differences between the two files is large. Either jitter or some other random or non-linear phase differences can cause this.
 

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,626
Likes
10,202
Location
North-East
Speaking of DeltaWave, or null test in general, for example, here are two files with a simple tone and they look pretty similar in DeltaWave, but no matter what settings I use I can never get a reasonable null depth figure or DF Metric. The generation of these files are totally unrelated to white noise, DSD and resampling. @pkane could this situation be improved?

View attachment 84425

I see. The file contains less than two seconds of data, and the waveform is a pure sinewave. DeltaWave uses cross-correlation to do the initial coarse-alignment and that doesn't work with simple periodic waveforms, such as sine waves, as they align on any of the captured cycles with the same correlation, so DW has no way to pick one offset as the best possible match. This is not a problem with noise or music, but simple periodic waveforms do present a problem.

With more samples (try 15-30 seconds) you could try the Measure Simple Waveforms option -- it tries to do the match without using cross-correlation.
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,692
You can skip the -n and -t flags since those make it insanely slow while improving quality slightly.
Thanks. Basically I wanted to check the maximum PCM input level. As you mentioned previously PCM-DSD_Converter with the strongest noise shaping among others indeed trashed the reference RMAA signal so I needed to reduce 3dB to obtain a usable DSD file. These tests were done using "rate -v 2822400 sdm -f clans-8" without additional flags. PCM conversions were done using the foobar plugin with my custom filter.

Actually I like such an obvious sign of distortion since one must reconvert the files again, unlike PCM clipping caused by resampling which will recover if subsequent input samples have smaller amplitude values.
RMAA.png


The waveform of 0dBFS input after decoding:
audition.png
 
Last edited:

RayDunzl

Grand Contributor
Central Scrutinizer
Joined
Mar 9, 2016
Messages
13,198
Likes
16,981
Location
Riverview FL
Speaking of DeltaWave, or null test in general, for example, here are two files with a simple tone and they look pretty similar in DeltaWave, but no matter what settings I use I can never get a reasonable null depth figure or DF Metric. The generation of these files are totally unrelated to white noise, DSD and resampling. @pkane could this situation be improved?

View attachment 84425

The two files, if upsampled in Audacity, show "intersample overs", if that is causing your problem...

1600926158780.png
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,692

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,700
Location
Hampshire
Thanks. Basically I wanted to check the maximum PCM input level. As you mentioned previously PCM-DSD_Converter with the strongest noise shaping among others indeed trashed the reference RMAA signal so I needed to reduce 3dB to obtain a usable DSD file. These tests were done using "rate -v 2822400 sdm -f clans-8" without additional flags. PCM conversions were done using the foobar plugin with my custom filter.
The SoX modulator can overload with evil inputs like high-level wideband noise extending well beyond the audio range. If that happens, the -n/-t flags can help at a significant cost in speed.
 

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,700
Location
Hampshire
How many MIPS (or GHz) must have a 1-bit ADC chip for the same exact digitization?
With an 8th-order noise shaping filter, the modulator core does 15 multiplications and 24 additions per sample. The design is similar to what actual chips use.
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,692
The SoX modulator can overload with evil inputs like high-level wideband noise extending well beyond the audio range. If that happens, the -n/-t flags can help at a significant cost in speed.
Thanks. Another question. Suppose I want to convert a DSD64 file to 88.2k PCM, I can use something like:
rate -b 74 -v 88200

Now I want to convert to 176.4k PCM and the -b flag can't suppress the noise, so I use:
sinc -32k -n 1023 rate -v 176400

Is there a better/faster way to do this?
 

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,700
Location
Hampshire
Thanks. Another question. Suppose I want to convert a DSD64 file to 88.2k PCM, I can use something like:
rate -b 74 -v 88200

Now I want to convert to 176.4k PCM and the -b flag can't suppress the noise, so I use:
sinc -32k -n 1023 rate -v 176400

Is there a better/faster way to do this?
Try the undocumented "rate -u" which has higher stopband rejection than -v. Yes, I ought to fix the manual.
 
Top Bottom