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)
#!/usr/bin/python from sys import path path.append("../oscpython") import OSC OSC.Message("/clam/target",("testing the","typed","controls",3.14)).sendlocal(7000)
#!/usr/bin/python from sys import path path.append("../../osc/oscpython") import OSC import time print "playing samples" OSC.Message("/clam/target", [int(0), "play", int(1)]).sendlocal(7000) time.sleep(0.1) OSC.Message("/clam/target", [int(1), "play", int(1)]).sendlocal(7000) time.sleep(5) print "stoping samples" OSC.Message("/clam/target", [int(0), "stop", int(1)]).sendlocal(7000) time.sleep(0.1) OSC.Message("/clam/target", [int(1), "stop", int(1)]).sendlocal(7000)