[PD] floats getting forced into int

Roman Haefeli reduzierer at yahoo.de
Wed Feb 14 15:57:01 CET 2007

hi david

pd doesn't distinguish between floats and ints, since all numbers are
32-bit-floats in pd (whereas max/msp DOES distinguish between floats and
ints). so what actually happens in your example, is that all numbers are
converted to floats (ints are converted to floats, not the other way
around). afaict, this shouldn't be a problem as long as you stay in pd.
a problem might occur, when you want to send numbers from pd to another
app like max/msp. when you want to send '1.0', this is turned to '1' by
pd, so the app on the other side might think, it is an int, though it is
meant to be a float. i don't know of a nice way yet to overcome this.


On Wed, 2007-02-14 at 08:35 -0500, David Brynjar Franzson wrote:
> Hey,
> I am working on a project that sends OSC messages from PD, and for
> some reason, when dealing with message lists of mixed objects, such as
> [send /OSC/blah 0.0 1.0 1.0], PD turns the floating point numbers into
> int, but only when they represent whole numbers. Can anyone think of a
> work around where they stay as floating point, or is there some simple
> solution that I am missing (I can't be bothered to hack up an external
> just to solve this).
> thanks,
> db
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list

Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

More information about the Pd-list mailing list