Hey Everybody I really need your help..
can someone show me how to make a processing sketch that receive input from max by using open sound control
I have a simple processing sketch which basically is a drawing tool.. I want to send X&Y coordinates from a pictslider in max and control the drawing with that max object instead.. It will be done by using the udpsend.
My problem is how to write the processing sketch!!
I guess this is usefull, the only problem is that I dont know how to use the sendreceive example together with my sketch (see link)
THIS IS THE SKETCH
______________________
import processing.pdf.*;
void setup() {
size(400,400);
smooth();
colorMode(HSB, 100);
}
void draw() {
float abstand = dist(pmouseX, pmouseY, mouseX, mouseY);
if(mousePressed == true) {
if (abstand > 20) {
abstand = 20;
}
strokeWeight(20-abstand);
line(pmouseX, pmouseY, mouseX, mouseY);
}
}
void mousePressed() {
println("mouse gedrückt");
stroke(random(255), r,50);
}
void keyPressed() {
if (key == 's') {
println("Frame abspeichern");
saveFrame("screenshot-####.tif");
}
if (key == 'b') {
background(100);
}
if (key == 'p') {
beginRecord(PDF, "zeichnung.pdf");
colorMode(HSB, 100);
background(100);
}
if (key == 'e') {
endRecord();
}
}
________________________________
please help
mvh Bjørn Dam Larsen