TouchOSC<--Processing OSCP5 Library Question
in
Contributed Library Questions
•
7 months ago
So I'm trying to send data to touch osc running on my iphone from processing with the OSCP5 Library. basically i want toggle switches and faders to stay in sync with processing says the values are. But Im having difficulties retrieving the data on the phone, or more specifically, the iphone updating. i've confirmed that with my sketch posted below, that the osc comes in correctly formatted (with the PureData basic.pd sketch provided on the website) I also get the little red light on the touchOSC (near the page slider to stand for the fact that data has been received) however the toggle swithces do not change state on the app. Does anybody have a reason as to why this is happening and how to fix it? I hope it is something simple!
Thanks!!
- import oscP5.*;
- import netP5.*;
- OscP5 oscP5;
- NetAddress Remote;
- int portOutgoing = 9000;
- String remoteIP = "192.168.1.131";
- void setup()
- {
- oscP5 = new OscP5(this,8000);
- Remote = new NetAddress(remoteIP,portOutgoing);
- }
- void draw()
- {
- myDelay(3000);
- String labelMessage = "";
- // send message to the iPad to update labels
- OscMessage myMessage = new OscMessage("/1/toggle1 1");
- myMessage.add(labelMessage);
- println(myMessage);
- oscP5.send(myMessage, Remote);
- }
- void myDelay(int ms)
- {
- try
- {
- Thread.sleep(ms);
- }
- catch(Exception e){}
- }
1