@noel THank you for taking a look.
I was using println() just to make sure the OSC information was making it into Processing. I am trying to stretch this project in real time.
Here’s a few images so you can see what’s happening
here’s the code. I tried a few different approaches for displaying the image like:
image(screen, 0, 0, (int)desired_width, (int)desired_height );
and
image(screen, 0, 0, width, height );
It’s not really doing much to the height dimension. Maybe this is a crazy idea. I can do it pretty easily in some video software, like Jitter, so I figured it would be easy to accomplish. Maybe there is a better approach.
import oscP5.*;
//OSC receive
OscP5 oscP5;
float desired_width = width;
float desired_height = height;
PImage screen;
void setup() {
fullScreen(2);
//size(800, 800, P3D);
oscP5 = new OscP5(this, 12000);
}
void oscEvent(OscMessage theOscMessage) {
float value1 = theOscMessage.get(0).floatValue();
if (theOscMessage.checkAddrPattern("/dw")) {
if (value1 > 0) {
desired_width = value1;
} else {
desired_width = width;
}
}
float value2 = theOscMessage.get(0).floatValue();
if (theOscMessage.checkAddrPattern("/dh")) {
if (value2 > 0) {
desired_height = value2;
} else {
desired_height = height;
}
}
}
void draw() {
strokeWeight(50);
stroke(50, 50, 200);
fill(150, 50, 20);
ellipse ( width/2, height/2, 500, 500);
screen = get(0, 0, (int)desired_width, (int)desired_height);
screen.resize((int)desired_width, (int)desired_height);
image(screen, 0, 0, (int)desired_width, (int)desired_height );
// image(screen, 0, 0, width, height );
println(desired_height);
}