[PD] Receiving OSC on Java
Hugo Solis Garcia
hugosg at media.mit.edu
Thu Feb 5 06:51:16 CET 2004
Thanks everybody for your time and help!
Ok, summarising just in case, news after the explanation:
-------------------------------------
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:8989 (hSock=144348816)
then I send to the SendOSC the message "send /pureData 1"
I get nothing in the Java side???
--------------------------------------------
b,j,: Sorry, I did a mistake in the copy and paste. Nothing suspicious
in regard to the portnumber (I had written connected to port
localhost:8082 by mistake, it was 8989 wich means that the message of
conection was ok)
--------------------------------------------
I put a DumpOSC within my pd patch on the same port as I'm running
JavaOSC as C. Ramakrishan suggested and I get the messages good within
PD. now I removed just in case it could cause a problem.
I hope you still able to give me a hand!
Thanks a lot.
H
More information about the Pd-list
mailing list