[PD] Receiving OSC on Java

Rene Christen nay_m_c at hotmail.com
Wed Feb 4 01:45:16 CET 2004


don't know if there is anything here to help but the proctologic project has 
kits in diff languages to send/recieve osc:

http://galatea.stetson.edu/~ProctoLogic/

>From: Hugo Solis Garcia <hugosg at media.mit.edu>
>To: osc_dev at create.ucsb.edu
>CC: pd-list at iem.at
>Subject: [PD] Receiving OSC on Java
>Date: Tue,  3 Feb 2004 18:28:27 -0500
>
>Hi!
>After the Chandrasehar R. response I decide to try a little bite more.
>I still unable to receive OSC with the new version posted on December
>2003.
>My testing implementation is really simple, if you have some minutes I
>really apreciate your help! Thanks!
>
>This is my code in Java:
>
>import com.illposed.osc.*;
>import java.net.*;
>
>public class OSCReceiverSimple01 extends java.applet.Applet implements
>OSCListener {
>
>     OSCPort myOSCPort;
>
>     public void init() {
>         try {
>             myOSCPort = new OSCPort(InetAddress.getLocalHost(), 8989);
>             myOSCPort.addListener("/pureData", this);
>             myOSCPort.startListening();
>         } catch (Exception e) {
>             System.out.println(e.toString());
>         }
>     }
>     public void acceptMessage(java.util.Date date,
>com.illposed.osc.OSCMessage oSCMessage) {
>         System.out.println("I get something");
>     }
>}
>
>In PD I have an Object SendOSC, I send to it the message "connect
>localhost 8989" and I get the message
>connected to port localhost:8082 (hSock=144348816)
>then I send to the SendOSC the message "send /pureData 1"
>I don't get nada in the Java side???
>I've been trying with more complex situations. For example adding a
>main in the applet and running it as single executable just in case it
>was a problem with conection permitions, however nothing happens. I
>also try creating a independent class for the listener as the example
>of Donald R. Tognazzini suggest (see later). However I get the same
>silence.
>
>     class MyOSCResponder implements OSCListener
>     {
>         public MyOSCResponder( )
>         {
>         }
>
>         public void acceptMessage( Date time, OSCMessage message )
>         {
>             System.out.println( "Received OSC Message:\n" +
>                                 "Time    : "  + time + "\n" +
>                                 "Message : " + message );
>         }
>     }
>
>     // create the responder
>     MyOSCResponder myResponder = new MyOSCResponder( );
>
>     // register to receive "/done" messages
>     someOSCPort.addListener( "/done", myResponder );
>
>     // register to receive "/n_end" messages
>     someOSCPort.addListener( "/n_end", myResponder );
>
>Maybe someone know what is wrong, maybe there is a bug, maybe I'm
>forgeting something simple. I didn't try the IIRC solution that Martin
>Rumori suggest since it involves more elements (thanks Martin anyway!)
>Just in case it could affect, I'm using Fedora system, PD version 1.37
>Thanks alot!
>
>_______________________________________________
>PD-list mailing list
>PD-list at iem.at
>http://iem.at/cgi-bin/mailman/listinfo/pd-list

_________________________________________________________________
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp





More information about the Pd-list mailing list