Re: [pksampler-devel] receiving osc from scsynth
Status: Beta
Brought to you by:
patrickkidd
From: altern <al...@gm...> - 2007-02-19 21:31:40
|
hi patrick Patrick Stinson wrote: > First tip: Verify that your server is sending that message! Use > pkechoosc to make sure that you are getting your message back from > your server. You can send it a port if you want, but defaults to > 57110. i could see that it was sending it because i set verbose and spew on, i could not find how to bind OSC addresses with pieces of code. But I finally did find a way today. self.server.listener.register('/address', afunction) > You should pass a list of strings to receive, not just a string. > > The code is very simple and well-laid out, so give it a read. The > Controller has a listener, which reads from the socket and decodes the > message. You can register callbacks based on message key on the > listener, but the controller has a receive method that you can use > instead. ah, i did not get that, i was wondering all the time what was the receive method for. I think i worked too much last days and it has taking me ages to find which was the part of the code which was actually doing the job. thanks ! enrike > > On 2/18/07, altern <al...@gm...> wrote: >> hi >> >> i am trying to execute some code when some osc mesages come from the >> scsynth. They are produced by a SendTrig so they have /tr address. At >> the moment i get the osc printed on the console, but i cannot find the >> way to bind them to a callback. >> >> I tried few things like >> >> def test(*args) : print 'gotit', args >> import scosc.controller >> controller = scosc.controller.Controller( ('127.1.1.1', 57110) ) >> controller.receive('/tr') >> >> but it doesnt seem to get anything. i get this error >> line 99, in receive >> raise IOError('timeout waiting for reply') >> >> any tips? >> thanks >> >> enrike >> >> ------------------------------------------------------------------------- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to share your >> opinions on IT & business topics through brief surveys-and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> _______________________________________________ >> pksampler-devel mailing list >> pks...@li... >> https://lists.sourceforge.net/lists/listinfo/pksampler-devel >> > > |