Csound Csound-dev Csound-tekno Search About

Re: Higher numerical precission in Csound

Date1999-06-06 03:46
FromMike Berry
SubjectRe: Higher numerical precission in Csound
	Actually, lots of commercial software does use doubles.  No one uses 24
bit integers internally, because they are not a native type to basically
any machine.  So the 24 bit conversion happens purely at i/o level, and
not internally at all.  Some may use 32 bit longs, but I will bet (and
this is true of all of the pro software I have worked on) that most use
floats or doubles internally, like csound.
	As for which to use, it depends on and should be chosen to match the
situation.  A few years ago I did a bulk search and replace in the
csound code for floats and changed them to doubles.  I then compiled on
a PPC and found that things ran slower, not faster as I expected.  I
expect that the memory access hit for the cache outweighed the
precision-conversion speed increase.  This was with an eye for real-time
performance (the speed loss was only a couple of percent).  For file
generation, I would suggest doubles all the way through.  Because csound
is so flexible, there are an infinite number of ways that an orc could
suffer from precision loss.  Some will, some won't.
	The place it will bite you is in things like orcs with 5 minute delay
lines.  Suddenly, you will only be able to have half as many in RAM...

paul winkler wrote:

> Csound's internal precision equals or exceeds that of extraordinarily
> expensive "pro audio" software and hardware (a signal path that
> maintains at least 24 bits of integer precision from start to end is
> considered quite good; speed is always a concern, so probably most
> commercial software systems don't use doubles except for rare cases that
> really require it, and maybe not even then).


-- 
Mike Berry
mikeb@nmol.com