Update of /cvsroot/pure-data/supercollider/python In directory sc8-pr-cvs1:/tmp/cvs-serv27869
Modified Files: supercollider.py Log Message: Convert all floats to ints before sending to the synth
Index: supercollider.py =================================================================== RCS file: /cvsroot/pure-data/supercollider/python/supercollider.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** supercollider.py 20 Jan 2004 16:54:44 -0000 1.1 --- supercollider.py 21 Jan 2004 08:58:03 -0000 1.2 *************** *** 25,29 ****
! import OSC,tempfile,xreadlines,os,time
standardport=57110 --- 25,29 ----
! import OSC,tempfile,xreadlines,os,time,types
standardport=57110 *************** *** 46,55 **** if magic!=1234: print "Server.__init__: Are you sure you know what you are doing?" ! print "Seems like probably wanted to use the 'localServer' variable." self.port=port self.freenode=startnode; self.freebuffer=startbuffer; def sendMsg(self,command,*args): ! OSC.Message(command,args).sendlocal(self.port) def sendgetMsg(self,command,*args): apply(self.sendMsg,[command]+list(args)) --- 46,60 ---- if magic!=1234: print "Server.__init__: Are you sure you know what you are doing?" ! print "Seems like you probably wanted to use the 'localServer' variable." self.port=port self.freenode=startnode; self.freebuffer=startbuffer; def sendMsg(self,command,*args): ! def floatToInt(x): ! if type(x)==types.FloatType: ! return int(x) ! else: ! return x ! OSC.Message(command,map(floatToInt,args)).sendlocal(self.port) def sendgetMsg(self,command,*args): apply(self.sendMsg,[command]+list(args))