I attempted to map data from external devices to draw patterns. But the oscP5 library and P3D renderer could not work together in processing both 3.3.7 and 3.4 while they can work separately. They can work in processing 2.2.1 but 2.2.1 doesn't support the sound library. Any one knows how to solve it?
import oscP5.*;
OscP5 oscP5;
float value;
void setup(){
size(400, 400, P3D);
rectMode(CENTER);
oscP5 = new OscP5(this, 60000);
}
void oscEvent(OscMessage theOscMessage){
if (theOscMessage.checkAddrPattern("/ATT")){
value = theOscMessage.get(0).floatValue();
}
}
void draw(){
background(0);
noStroke();
fill(255);
float r = second()/10;
rotateZ(r);
rect(width/2, height/2, value, value);
}