The only difference is a DC offset of 1/2 LSB.Please, try your demonstration with "round" not "floor".
The only difference is a DC offset of 1/2 LSB.Please, try your demonstration with "round" not "floor".
Please, try your demonstration with "round" not "floor".
If you add dither to my finances, will my bank account go up and down by a few cents every time I look at the balance?
Perhaps you can clarify why certain test discs (CD) of mine use different (to one another) digitally generated (not from analog sign gen) prime frequencies for the high precision THD testing tracks?
The Denon uses (small excerpts- not complete) 1001/3149/6301/9999/15999Hz etc. The CBS-CD1 uses 997/4001/7993/19997Hz etc The Philips test disc 3 uses 997/10007/16001Hz etc. My Sony test discs use even figures (1KHz,10KHz etc)
I've seen and read various explanations about hitting absolute 16 bit values or correlation with the sampling frequency but the only one that lines up with that is the Denon disc (1982) and it would have been a 44,056 sample rate on a Umatic based source (via a PCM-xxxx adapter at the time I assume), which makes no sense as the frequencies are spot on at 44,100.
Way back in 1984, Louis Challis compared the Sony YEDs with the Denon 99 track test disc and found a big difference in the 5th harmonic. Were/are digitally generated sines synthesized from lookup tables? Is the difference in 5th to do with the chosen frequency or a flaw in the generated sine itself?
(The Sony is a misprint, the frequency is 1000Hz)
View attachment 48940
I tried 997,8,9 1000 and 1001,2,3 generated sines on loopback (ARTA) and could repeatedly get better (very tiny amount) residual THD than the 1KHz. That was with either 24/44.1 or 24/48. I couldn't do 16/44.
Anyway, I'll be perfectly honest, I'm confused about it all and have been for years.
And the Denon disc gives lower THD than the CBS CD-1 test disc (which was the test standard for years at all the audio magazines) on many of its high precision tracks too. Not only that, the Denon is balls accurate (benchtop freq counter) on all the spot frequencies, whereas the CD-1 isn't.
Then probably rounding operation, routinely used everywhere, is not the most correct and we should use some more sophisticated method for that?
(Recall that this is for a 1kHz sine wave at -40dBr, but scaled to 0dBr for the plots. Sample rate = 96kHz.)
Round:
View attachment 48989
c.f. Truncate towards negative:
View attachment 48990
Approx. error:
Round: -47dB
Truncate toward negative: -56dB
Dithered and noise shaped: -30dB
Brickwall HP filter at 20Hz (remove DC offset) and brickwall LP filter at 20kHz:
Round: -64dB
Truncate toward negative: -64dB
Dithered and noise shaped: -79dB
Thank you, @xr100, for the computation.The only difference is a DC offset of 1/2 LSB.
ref = audioread('sine1k96.wav');
out = audioread('sine1k96_q.wav');
10*log10((1-corrcoef(ref, out)))
This simple math test shows that both signals being dithered+quantized were degraded to noticeably higher extent (+5dB/+6dB) than just rounded. If you send me the reference/processed signals from your examples I will compute df levels for them.
Until you do, I have no interest in anything you have to say.Yes, floor and round are almost the same; there is a small difference around 0.5 -1dB for some signals but I did not understand its
Elaborate, please.One operation is noticeably missing...
Elaborate, please.
Brickwall HP filter at 20Hz (remove DC offset) and brickwall LP filter at 20kHz
DC offset is not accounted by corr.coeff by definition. Lowpass filter can spoil the waveform even further. I hope xr100 will send his files.Until you do, I have no interest in anything you have to say.
Yes, I usually examine the initial assumptions. Testing degradation of waveforms with corr.coeff looks suspicious to you? Or did I miss something again?Have you considered that your basic premise could be flawed?
This simple math test shows that both signals being dithered+quantized were degraded to noticeably higher extent (+5dB/+6dB) than just rounded.
DC offset is not accounted by corr.coeff by definition. Lowpass filter can spoil the waveform even further. I hope xr100 will send his files.
Perhaps you can clarify why certain test discs (CD) of mine use different (to one another) digitally generated (not from analog sign gen) prime frequencies for the high precision THD testing tracks?
The Denon uses (small excerpts- not complete) 1001/3149/6301/9999/15999Hz etc. The CBS-CD1 uses 997/4001/7993/19997Hz etc The Philips test disc 3 uses 997/10007/16001Hz etc. My Sony test discs use even figures (1KHz,10KHz etc) […]
The most interesting for me is to measure df before and after filtering. But if it is not difficult, please, send them all )). Or another option - choose the ones which are interesting for you to measure df.Which files would you like? Did you want them with the high-pass and low-pass filters imposed (post-dither/truncation) on the signal also?
Certain frequency and amplitude combinations at a given sample rate result in exact sample values. Many more yield minimal errors on simple truncation. You found one of these. This is useful for testing but of little importance in general use where any frequency may be encountered.997Hz sine @ -10dBr, truncate to 16-bit, 44.1kHz sample rate:
View attachment 49035
1000Hz sine @ -10dBr, truncate to 16-bit, 44.1kHz sample rate:
View attachment 49036
(As previously, rescaled so the amplitude of the sine wave is at 0dBr for the plots.)
The most interesting for me is to measure df before and after filtering. But if it is not difficult, please, send them all )).
Whilst we're on this windows business, how about a discussion on FIR filter impulse response windowing...
(I've mostly used Kaiser.)