[PD] double precision + benchmarking

Miller Puckette mpuckett at man104-1.ucsd.edu
Sun Mar 24 05:51:11 CET 2002


Hi all,

I think 32 bit precision is enough for most uses you would put an oscillator
to.  The reason Pd uses double is so that the mantissa can have at least the
32 fractional bits plus another 8 bits of "headroom" so that the floating
point adder won't shift the phase as it accumulates.

For hardware platforms which don't have hardware double precision
arithmetic, it's probably better to keep phase as a 32-bit fixed-point
fraction.  I think the oscillator in csound works like this and could
be used in place of Pd's oscillator code (same for phasor~, cos~, and
friends.)

However, signgle-precision floating point phase probably won't work
well...

cheers
Miller

On Sun, Mar 24, 2002 at 03:41:54AM +0100, Sukandar Kartadinata wrote:
> Dear list,
> while the basic port of pd for the gluiph's TriMedia port went rather 
> painlessly (compared to the hardware dev anyway...), there's still a 
> few details that need to be ironed out. One I'd like to have your 
> opinion/experience on is double precision arithmetic, which I'd have 
> to run thru a software lib that slows things down by a factor of 100.
> Browsing thru the pd source, double precision seems to be used mainly
> (1) to process phase information for the oscillators
> (2) for system timing and
> (3) misc. graphic stuff.
> 
> (3) is not much of a problem since the GUI will be stripped anyway
> (2) is not called all too often (?), so the slow down is kinda acceptable
> (1) is what I'd like your opinion on - how much do double precision 
> phases improve sound quality ?
> (btw it seems that e.g. phasor~ doesn't use most of those extras bits 
> but wraps around at 32 bits... can this be confirmed ??)
> 
> 
> second question is what people use for benchmarking, as I'm curious 
> to see how my little box stacks up against the heavyweights. 
> Preferably something w/o sound file access, as the file system is one 
> of those other details I still have to tweak...
> 
> thanks much,
> Sukandar
> -- 
> 
> __--__--__-___-_--_-_-___-_-_--___-_-___
> sukandar kartadinata
>    the glui performance hardware
>      http://www.glui.de/proj/gluiph.html
> _--__---_--_--___---_-_-_--_-__-



More information about the Pd-list mailing list