We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Pages: 1 2 
OSCp5 (Read 7862 times)
Re: OSCp5
Reply #15 - Jun 18th, 2008, 11:39am
 
The OSC communication between OSCp5 and Glovepie was slow because of Glovepie, not oscP5.

UPDATE: working great with glovepie 3
Re: OSCp5
Reply #16 - Oct 10th, 2008, 7:53pm
 
HI! I'm sort of new in processing, but i'm trying to sync my processing sketch with a MaxMsp application running on another computer trough the UDP connection.
I managed to send one signal from max to processing, but i need to send multiple signals and i need to find a way to identify the different values to assign them to different variables in processing.
Any suggestions, here is the code:

/**
* oscP5message by andreas schlegel
* example shows how to create osc messages.
* oscP5 website at http://www.sojamo.de/oscP5
*/

import oscP5.*;
import netP5.*;

int k;
int taglia;
float col;

OscP5 oscP5;

void setup() {
 size(1400,800);
 //frameRate(25);
 /* start oscP5, listening for incoming messages at port 12000 */
 oscP5 = new OscP5(this,12000);
 
 OscProperties properties = new OscProperties();
 
 properties.setDatagramSize(1024);
 properties.setListeningPort(12000);
 oscP5 = new OscP5(this,properties);
}


void draw() {
 background(0);  
    //float px=random(0,width);
  //float py=random(0,height);
  rectMode (CENTER);
  fill(255);
  rect(width/2,height/2,k,k);

}




/* incoming osc message are forwarded to the oscEvent method. */

void oscEvent(OscMessage theOscMessage) {



  taglia = theOscMessage.get(0).intValue();
  //col = theOscMessage.get(1).floatValue();
  println(taglia);
  k=taglia;

}
 



thanks
Re: OSCp5
Reply #17 - Oct 11th, 2008, 7:44am
 
You need to prepend your messages with an identifier string in Max (using the prepend object), and then once they're in processing, parse them out using the .getAddrPattern() method.

Also take a look at the Bundle class.

Hope this helps!

-M
Re: OSCp5
Reply #18 - Oct 11th, 2008, 4:07pm
 
Great! that sound a good solution, i'll talk with my max's mate; let's see if that works...

thanks
lorenzo
Re: OSCp5
Reply #19 - Sep 10th, 2009, 10:52am
 
Hi I'm trying to get the .x, or .nX or any coodinate from the wiiController, it is returning 0 so far.. Any Idea of what is going wrong?

Thank you..
Pages: 1 2