Csound Csound-dev Csound-tekno Search About

Re: floats v ints (was RE: IRCAM format)

Date1998-08-05 19:33
FromCharles Baker
SubjectRe: floats v ints (was RE: IRCAM format)
AttachmentsNone  
Indeed, float as storage format gives same resolution as 24-bit fixed
point
ints....but it is just this normalzation that occurs in correctly moving

from int formats output by most A/D's and synth progs. to float that is
the great advantage. If one never examines the sounds one uses and
generates,
to assure that one is using the full word size available, each operation

that outputs int values (no matter the internal processing resolution)
can and does worsen the quantization error. This is not the case if
one outputs floats, then normalizaes the result. I have simple shells
scripts
using sox that convert to float and normalizes the result for my
soundfiles.
If disk space is a worry, *then* one can convert to int format, and
still
maintain as high a  degree of quality as one can in that particular word
size.
Such practices also make mixing a *lot* more intuitive...all files will
at least
respond to similar scaling ("mix amp") values in a similar, and more
predictable way.
And , yes, adding two *un-normalized* float values can give ridiculous
results:
but working with normalized floats is simply superior
in my experience, especially when one is working with a great many tools

...
yep 24 bit int DSP *if done correctly* is clean... but for most of us,
working with normalized floats is both a simplfication and an
improvement
in sonic quality.

Perhaps someone disagrees?
CharlieB--
*********************************************
Charlie Baker              baker@charlieb.com
"We die with the dying:
 See, they depart, and we go with them.
 We are born with the dead:
 See, they return, and bring us with them."
T.S.Eliot, Four Quartets: Little Gidding,V
*********************************************

Indeed, float as storage format gives same resolution as 24-bit fixed point
ints....but it is just this normalzation that occurs in correctly moving
from int formats output by most A/D's and synth progs. to float that is
the great advantage. If one never examines the sounds one uses and generates,
to assure that one is using the full word size available, each operation
that outputs int values (no matter the internal processing resolution)
can and does worsen the quantization error. This is not the case if
one outputs floats, then normalizaes the result. I have simple shells scripts
using sox that convert to float and normalizes the result for my soundfiles.
If disk space is a worry, *then* one can convert to int format, and still
maintain as high a  degree of quality as one can in that particular word size.
Such practices also make mixing a *lot* more intuitive...all files will at least
respond to similar scaling ("mix amp") values in a similar, and more 
predictable way.
And , yes, adding two un-normalized float values can give rediculous values:
(sp! sorry, no editor & I bet this doesn't even make the list...I'm not
on my normal isp.) but working with normalized floats is simply superior
in my experience, especially when one is working with a great many tools 
...         
yep 24 bit int DSP *if done correctly* is clean... but for most of us,
working with normalized floats is both a simplfication and an improvement
in sonic quality.
 
Perhaps someone disagrees?      
CharlieB