[CM] problem with doubles and SC

Joshua Parmenter joshp@u.washington.edu
Mon, 12 Dec 2005 09:48:06 -0800


There seems to be a problem with OSC and doubles... what follows is a  
short example using pi. Notice that when the object is created, it  
prints in the listener correctly, but once it is written out to  
the .osc file (and then read back with dumposc), the values is  
definitely wrong (5.7094773E-9)

Any ideas?

Thanks,

Josh


? (defobject test (scsynth) (pi) (:parameters pi time))
? (new test :pi pi :time 0.0)
#i(test time 0.0 node -1 add-action 0 target 1 pi 3.141592653589793D0)
? (events (new test :pi pi :time 0) "test.osc" :play nil)
"test.osc"
? (dumposc "test.osc")

[
[0.0, ["/g_new", 1, 0, 0]],
[0.0, ["/s_new", "test", -1, 0, 1, "pi", 5.7094773E-9]],
[5.0, ["/none"]],
[5.0, ["/none"]]
]
T
?

******************************************
Joshua Parmenter
joshp@u.washington.edu
Post-Doctoral Research Associate - Center for Digital Arts and  
Experimental Media
Raitt Hall - University of Washington
Seattle, Washington 98195

http://www.dxarts.washington.edu
http://homepage.mac.com/joshpar