View Single Post
  #2   Report Post  
Posted to rec.audio.pro
Arny Krueger Arny Krueger is offline
external usenet poster
 
Posts: 17,262
Default Dither randomizes file?


"alex reznick" wrote in message
...
Hi everyone

I converted the same file from 32 bit to 16 bit twice, repeatedly,
using the same dither and noise shaping, and it is quite consistent:

1) both files are NOT identical when the conversion is done in Cool
Edit Pro and Samplitude - over 12 million differences, and the delta
file looks like continuous broadband noise at -59.679 dB in Samplitude
and -78.268 dB in Cool Edit Pro


I just did the same thing using as my 96/32 reference the 96k file from one
Alex Resnik.

I converted the file to 16 bits twice by the following means:

(1) Selected the entire 96/32 file.
(2) Did an edit, copy to new, twice
(3) Converted both file copies to 16 bits
(4) Did an edit, copy of one of the two 16 bit files.
(5) Did an edit, mix paste of the clipboard the other 16 bit file using 100%
mixing, but with the invert flags turned on.
(6) Found a residual difference of about -93 dB RMS.

Looks to me like the dither that was used in the conversion to 16 bits was
actually pseudo random, and was being taken from the same pseudo random
source at different points in its generation sequence. I used no noise
shaping. It is possible that other noise shaping would result in far larger
differences because they involve amplifying the noise to far higher
amplitudes at high frequencies.


2) both files ARE identical when the conversion is done in Izotope RX


The could achieve this by resetting the seed of their pseudo random source
at the beginning of every dither operation.

Does this mean that some programs inject randomized noise, and others
non-randomized?


Dithering is not necessarily a random process. In programs it is done via a
static algorithm, so given the identical same inputs, the results will be
identically the same.

However the noise source used may or may not produce a repeatable sequence.
It's an interesting (but in this case fairly useless) philosophical question
whether the noise source used should be more or less random. Most audio
random noise sources work about the same as long as you make their sequences
long enough that the repetitions aren't heard. this takes a sequence that is
more than a few seconds long, but less than a few minutes. That's for noise
at very audible levels. At low levels a sequence that is only a few seconds
long might suffice. A well-designed random number generator will generate a
sequence that is at least as long as the largest number that it can
generate. For 32 bits and audio frequencies, the pseudo random sequence
would be more than 4 billion (thousands of millions) samples long.

In general there are no truly random sources in the world of programming.
They all use pseudo-random noise sources. Pseudo-random noise sources are
100% predictable. They start with a seed and produce a sequence of numbers
based on it. The randomness of a pseudo random noise source can be
apparently *improved* by picking the seed from an outside source such as the
current time/date. Another equally valid approach is to just keep the pseudo
random source running based on the same seed. A third equally valid approach
would be to start with the same seed every time more random numbers are
needed. There are probably some circumstances where one of the 3 options is
better than the rest. Dithering is probably not one of them.

But then if randomization is the case, why does the
delta file show the difference in noise levels that is consistent from
pair to pair comparison?


I repeated conversion 8 times in Cool Edit, and the delta between 1 &
2, 3 & 4, 5 & 6, 7 & 8 takes is always -78.268 dB.


Can anybody explain what is going on here?


You can probably change the size of the delta by adjusting the amount and
shaping of the dither.