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.
IndexProgramming Questions & HelpSyntax Questions › specify incoming int sequence
Page Index Toggle Pages: 1
specify incoming int sequence (Read 439 times)
specify incoming int sequence
Jun 20th, 2009, 6:31am
 
hallo, as the object says I'm trying to specify the incoming ints in order to fire another message to be sent. this is the final part of my sketch, where the issue is, and it's been done with oscp5 library:

void oscEvent(OscMessage theOscMessage) {
   
   println("received a message.");
   if(theOscMessage.addrPattern().equals("/test") && theOscMessage.typetag().equals("iii") ) {            
   OscMessage o = new OscMessage("/pang");            
 oscP5.send(o, myRemoteAddress);      
}


so everything works so far, when /test message with three ints reaches the incoming port, a /pang message is sent to myRemoteAddress. this is what I wanted to achieve.
The only thing that i'm missing is to specify the values of the three ints. so assuming that the message that I need in order to fire /pang is:

/test  int=1 , int=2, int=3

I tried to substitute the ("iii") with (123) and also (1,2,3) but it didn't work. so the question is, how can I specify the incoming int  values to fire /pang message, so I can be even more specific?

thanks
Re: specify incoming int sequence
Reply #1 - Jun 20th, 2009, 9:57am
 
I haven't used oscP5 but it looks like it provides a parsing method which should do what you want...

[edit] Alternatively you may want to look at the oscP5plug service
Page Index Toggle Pages: 1