On Fri, Oct 10, 2008 at 08:54:31PM -0400, Jim Bates wrote: > My earlier post regarding the dither problem in Csound5 was started before > I found out there is no dither currently in Csound5. While it has been > implied that dither is not needed on a floating point system, that > viewpoint is at odds with the following from the renowned mastering > engineer Bob Katz: > > "But one programming mistake, or a few cost-saving shortcuts, can ruin > ether fixed or floating point work, especially if shortcuts are taken at > the most critical time, when the final output number is converted to fixed > point 24 bit at the end. If those numbers are not converted (and properly > dithered to 24 bits) at that time, then the sound of the entire system can > be compromised." > ... > Floating point is not the ideal medium for dithering as you don't know > where the reference level is, it's "floating" :-). Some people argue > (probably correctly) that dithering makes no sense with floating point. So > most algorithm designers convert to fixed point and then dither. Does that > answer your question? This is correct. There is no need to add dither inside algorithms (e.g. filters, mixers, etc..) that operate entirely in FP, and it would be difficult to do since, as Bob says, there is no reference level and the granularity of the output signal is not fixed. You need dither when converting to an integer format, in particular anything less than say 20 bits. The procedure to do this when starting from floats is exactly the same as when you start from a higher precision integer format. You add noise then convert to integer. Except in some rather special cases, the amplitude of the noise depends on the 'step size' of the output format only - this is why the procedure is essentially the same for FP->16bit as for 24bit->16bit. The noise added should have a triangular distribution between -1 and +1 times the output step size. Ciao, -- FA Follie! Follie! Delirio vano e' questo! ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net