Hey guys,
I want to run two Sketches, so i can use two output-windows instead of just one.
I tried to do it in one Sketch, using a frameclass, but its not that clean and not working that great..
What is the easiest way to send variables from one sketch to another?
greets
philipp
I want to run two Sketches, so i can use two output-windows instead of just one.
I tried to do it in one Sketch, using a frameclass, but its not that clean and not working that great..
What is the easiest way to send variables from one sketch to another?
import oscP5.*;
import netP5.*;
OscP5 oscP5;
NetAddress myBroadcastLocation;
void setup() {
size(500,700);
noStroke();
oscP5 = new OscP5(this,12000);
myBroadcastLocation = new NetAddress("127.0.0.1",12000);
}
void draw() {
}
void mousePressed(){
OscMessage myMessage = new OscMessage("theValue");
/* send the message */
oscP5.send(myMessage, myBroadcastLocation);
}
- import oscP5.*;
import netP5.*;
ArrayList objects;
int count = 0 ;
OscP5 oscP5;
NetAddress myRemoteLocation;
void setup() {
oscP5 = new OscP5(this,12000);
myRemoteLocation = new NetAddress("127.0.0.1",12000);
}
void draw() {
}
void oscEvent(OscMessage theOscMessage)
{
// get the first value as an integer
int firstValue = theOscMessage.get(0).intValue();
println(firstValue);
}
greets
philipp
1