XML Feeds

.

[java-dev] Re: From Max to Processing (processing.org)

guillaume evrard.g at gmail.com
Mon Feb 11 02:33:08 MST 2008


hi peter,

i managed to do this easily, be sure you have installed the oscP5 library for processing. 
Then, try to open an example for processing, you will see in the code that a listener is created :

    oscP5 = new OscP5(this,12000);

means you have to send your osc messages to port 12000.

this is done with the udpsend object :

    [udpsend localhost 12000].

here, you have a one side communication from max to processing.

if you want to send osc messages from processing to max :

    myRemoteLocation = new NetAddress("127.0.0.1",13000);

will declare the port max/msp is listening to, then :

    OscMessage myMessage = new OscMessage("/test");
  
    myMessage.add(123); /* add an int to the osc message */

    /* send the message */
    oscP5.send(myMessage, myRemoteLocation);

you will receive the messages in max/msp with the udpreceive object :

   [udpreceive 13000]

this should work very well.

cheers

g
--
--
Guillaume Evrard
http://www.lagrandefabrique.com
http://www.pucemuse.com
http://www.ötite.net
--


More information about the java-dev mailing list