[chuck-users] translating a pd patch to chuck

altern altern2 at gmail.com
Thu Jan 4 08:42:47 EST 2007

hi joerg

joerg piringer wrote:
> works great!
> i'd like to contribute once the svn server is up.
> i could for example add code for my simple xy-control & maybe wiimote 
> support.

great! the server is up but i am getting some permission errors, i hope 
this would be solved in couple of days. On the mean time check the 
attachment. I did some changes making it a bit simpler.

This morning i worked on a chuck example for the client. It is included 
on the zip and it is called oscapp.ck. I added as well a readme.txt file 
where i describe the python API for the widgets and main server app.

I added as well the possibility to pass the application and executable 
and a patch, then it tries to run the patch with the executable. So i am 
passing 'chuck', 'oscapp.ck' and this runs the patch with chuck under 
the wx process. I was bored of having to open two terminals :)

On windows and osx i guess it needs to point to the chuck executable, i 
am on Linux and chuck is on the path.

All this means that using py2exe/py2app it is possible and very easy to 
create standalone exe/app of the guis/chuck patches. Of course this 
needs chuck.exe /chuck.app to be included in the subfolders. I can 
create a setup.py file that automatically packs the whole thing 
including files in a subfolder called 'data' where the patch and chuck 
executable can be included. I am doing this on a ixi app i am working so 
it would actually be very easy to adapt the script.

On a different direction I was considering how to allow chuck to talk to 
the widgets server to be able to define the gui from chuck. I already 
have some parts of it done but not totally sure how to go about it.

> one problem i ran into:
> one of the sockets isn't closed when i exit the app, so starting it 
> again yields the following error:
> Traceback (most recent call last):
>    File "C:\developer\wxmirra\example.py", line 19, in ?
>      MyApp(size=(400, 350), fps=10)
>    File "C:\developer\wxmirra\wxmirra.py", line 155, in __init__
>      self.oscIn = osc.createListener(port=inPort) # in this case just 
> using one socket
>    File "C:\developer\wxmirra\osc\oscAPI.py", line 51, in createListener
>      l.bind( (ipAddr, port) )
>    File "<string>", line 1, in bind
> error: (10048, 'Address already in use')

I think this might be a problem with the osc.py which was developed n by 
daniel holtz, we just did a wrap with a set of functions to ease its 
use. I guess the ports need to be closed when the library quits.

hehe ... this looks good.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: wxmirra.zip
Type: application/zip
Size: 5721 bytes
Desc: not available
Url : http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20070104/a487e77b/attachment.zip 

More information about the chuck-users mailing list