oscP5 from MAX to Processing
in
Contributed Library Questions
•
1 year ago
Hi,
I'm trying to send two different type of messages from MAX (because I have two different sensors-both touch ones) to processing. But the problem I have is that both of them validate for all my 'ifs' calling everything.
So from MAX I send: /
max
bscale $1 and /
max2
closeddoor $1
and the processing side:
if(theOscMessage.checkAddrPattern("/
max")==true) {
if(theOscMessage.checkTypetag("
sf")) {
String firstValue = theOscMessage.get(0).stringValue();
float secondValue = theOscMessage.get(1).floatValue();
if (firstValue.equals("
bscale")) {
//some stuff here
}
received=true;
println(received);
}
//check if the door is closed
if(theOscMessage.checkAddrPattern("/
max2")==true) {
if(theOscMessage.checkTypetag("
si")) {
//some stuff here
}
}
return;
}
What I am doing wrong?
Thanx in advance!
1