trouble adding messages to OscP5
in
Contributed Library Questions
•
1 year ago
Not sure what's going on here, but I'm getting an error while trying to add a string to an OSC message.
My "print" functions are returning the information just fine, but the shoutOut.add(String) method is throwing the error:
"addrpattern: /ping### [2012/8/9 12:49:13] ERROR @ OscP5 ERROR. an error occured while forwarding an OscMessage"
Here's the code thats causing the problem:
/*
thinking about learning how to think in order to more effectively learn
*/
My "print" functions are returning the information just fine, but the shoutOut.add(String) method is throwing the error:
"addrpattern: /ping### [2012/8/9 12:49:13] ERROR @ OscP5 ERROR. an error occured while forwarding an OscMessage"
Here's the code thats causing the problem:
- void ping(){
for (int i = 0; i <= 255; i ++){
String pingAddr = baseAddr + i;
if(pingAddr.equals(ip) || pingAddr.equals(touchOSC)){}//println("not pinging self or phone controller");}
else{
NetAddress pingLocation = new NetAddress(pingAddr, 8000);
OscMessage shoutOut = new OscMessage("/ping");
shoutOut.add(ip);
print(" ping sends: " + shoutOut.addrPattern() + " with stringvalue: " + shoutOut.get(0).stringValue());
println(" to pingAddr: " + pingAddr);
oscP5.send(shoutOut, pingLocation); //this specifically right here isn't working
}
}
pingSent = true;
println("ping sent");
}
/*
thinking about learning how to think in order to more effectively learn
*/
1