[PD] passing integers

Orm Finnendahl finnendahl at folkwang-hochschule.de
Wed Jan 16 16:33:01 CET 2002


Hi,

I'm trying to use integers in pd externals, but found out, there is no
such type. Therefor it seems to be impossible to deal with big integer
numbers (ca. 2 ^ 20 and above). Since I'm using them for masking
purposes, the numbers have to be transmitted correctly between objects
and I would like to use at least 32-bit precision

My question:

1. Is it possible to have integer inlets in externals?

2. How could a message preserve the precise value of the integer 
   (I found out, typing a big integer in a message box and
   closing/reopening the patch results in a cast to a real number with
   7 in radix 10 notation)?

3. If all this fails: How exact can a float represent an integer
   number (up to which value would the following function print
   "equal")?

void myclass_float (t_myclass *x, t_floatarg f)
{
   int   i;

   i = f;

   if (i == f)
     post("equal");
   else
     post("not equal");
}


Thanx in advance,

Orm



More information about the Pd-list mailing list