--- Miguel Lobo <[EMAIL PROTECTED]> wrote: > ---------- Forwarded message ---------- > From: Miguel Lobo <[EMAIL PROTECTED]> > Date: May 9, 2007 3:02 PM > Subject: Re: [fluid-dev] Purpose of dither? > To: Mihail Zenkov <[EMAIL PROTECTED]> > > Admittedly I have forgotten a lot about signal processing, but I'm > not sure > I agree with everything you're saying. > > Roughly, dither convert harmonic distortion to noise. > > > That much is clear. > > If we just add > > noise (random) to signal, distortion gone but noise will by > modulated > > by signal (correlate with signal). This noise not fully random. > > > So, let's consider the sequence a[n] = rand() / (float)RAND_MAX - > 0.5. > > How is each value in this sequence not "fully random" and completely > uncorrelated to all other values? AFAICS, this sequence is white > noise and > if you add it to your audio, you get no modulation. > > This is rectangle dithering. > > > Certainly the probability distribution of each a[n] is uniform > between - 0.5and > 0.5, so it is rectangular. > > To prevent this modulation and get pure white (fully random) noise > (it > > much better for human ears) not correlated with signal, we consider > > previous dither value. > > > If I'm not mistaken, we are in effect getting a new sequence: > > b[n] = a[n] - a[n - 1] > > And we are using this sequence for our dither. Now, this is in > effect > applying a high pass filter to a[n], so if a[n] was white noise, b[n] > will > not be. > > And, most certainly, each element of b[n] is not independent from the > previous one. For example, if you have b[n0] = 1, you know for a > fact that > a[n0] = 0.5 and a[n0 - 1] = -0.5. Therefore, b[n0 + 1] = a[n0 + 1] - > a[n0] > = a[n0 + 1] - 0.5 < 0. Therefore, b[n0] = 1 implies b[n0 + 1] < 0; > these > two elements are correlated and b[n] is not white noise. > > What am I getting wrong here?
This is exactly my complaint about current implementation of dithering. The noise is correlated drawn from a triangular distribution. My understading, I could be wrong, that the design was that noise is drawn from triangular distribution, but samples are uncorrelated. In the latter case two calls to rnd are needed. But I could be mistaken in the design goal. ZF __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ fluid-dev mailing list fluid-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/fluid-dev