[PD-dev] On RHEL5 mrpeach's packOSC sometimes generates negative values incompatible with udpsend for floats and negative input values

Adrian Corston eidorian at aladan.net
Thu Apr 14 08:55:49 CEST 2011


I am a PD newbie running PD on RHEL5 using RPMs downloaded from here:

http://ccrma-www.stanford.edu/planetccrma/mirror/centos/linux/planetccrma/5/i386/

OS is RHEL 5.5 and uname -a says: Linux myhost 2.6.18-194.el5 #1 SMP Tue 
Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

Using the PD file below (based on one I found somewhere) I see packOSC 
outputting negative numbers when floats or negative numbers are input.

#N canvas 2929 425 631 244 10;
#X obj 210 115 mrpeach/packOSC;
#X msg 210 24 send /int 1;
#X msg 258 77 send /negative -1;
#X msg 234 53 send /float 0.1;
#X text 293 24 <- works well;
#X text 343 53 <- convert float to negative value: ERROR!;
#X text 375 77 <- negative value. ERROR!;
#X obj 210 151 print;
#X connect 0 0 7 0;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;

Clicking on the send buttons in order, I see this output, the latter two 
lines of which udpsend won't accept (it expects an array of positive 
octets and prints an error when it receives negative numbers.)

print: 47 105 110 116 0 0 0 0 44 105 0 0 0 0 0 1
print: 47 102 108 111 97 116 0 0 44 102 0 0 61 -52 -52 -51
print: 47 110 101 103 97 116 105 118 101 0 0 0 44 105 0 0 -1 -1 -1 -1

I am guessing it might be a issue with octet signing - for the last 
example (send /negative -1) it looks like "-1 -1 -1 -1" maybe should be 
"255 255 255 255" which I am guessing would represent -1.  But I'm no 
OSC expert.

Does it look like a problem with the RPM?  It's the only one I could 
find for RHEL5.  I had a whole bunch of trouble compiling pd-extended 
from source but I suspect I might need to go back to that option.

Thanks for any help you can provide,
Adrian.




More information about the Pd-dev mailing list