Monday, June 11, 2012

Processing and OSC and ChucK

I just found this web site:
http://visiblearea.com/blog/Processing_and_ChucK

that looks helpful in connecting code written in ChucK with code written in Processing, which makes animations, etc Processing is open source, written in Java, and friendlier

UPDATE:  Julia and I spent today working on Processing => OSC => ChucK.  We ran into some problems we needed to figure out:

ChuckFilePlayDemo and ChuckHelloWorld would run successfully once and the second time we lost sound.  There was an if statement in the monitor.ck file that included kill commands for three different systems.  After commenting out everything but the killall -c chuck command for MacOS, the ChuckFilePlayDemo file worked fine on each successive play with sound and killed all running instances.  However, the ChuckHelloWorld demo did not terminate after hitting the stop button in Processing.

The error message was TCP IP cannot bind to port 8888.  We learned this meant there was another socket trying to access port 8888, and was preventing the second play.  We typed "netstat -tan | grep 8888" into the command line of terminal and it showed several lines followed with CLOSE_WAIT.  This meant that the command to finish that was sent from Processing did not completely close out the connection.  We could not figure out what was different between the ChuckFilePlayDemo.pde that was now running successfully and ChuckHelloWorld.pde, because we made the same changes to monitor.ck.

Tonight I tried again and ChuckHelloWorld.pde does stop and clears out any TCP IP connections in terminal so there is only one LISTEN, however, there is one residual tone that plays continuously.  When I run the ChuckHelloWorld.pde again, it does not override the tone.  The tone is in the background of the subsequent call to ChuckHellowWorld.

We then met to work on a design based off of this code to create a visualization of rain based on the amount of amplitude received through the adc connected to an external microphone.


1 comment:

  1. There is a processing forum on which I found a little info about Lion and Processing. You have to make sure Java is up-to-date and then Processing should work.

    Here is the link:
    http://forum.processing.org/topic/processing-on-mac-osx-10-7-lion

    Note also that some of the video is not supported - namely the web cam stuff. Probably the same is true in Java...it's an Apple Lion thing.

    ReplyDelete