Sono nuovo, cerco aiuto processing con pure data e kinect

ho bisogno di un'aiuto ho uno sketch di processing e devo aggiungere delle strighe che ho gia per usare la cam del kinect qualcuno può aiutarmi? a dove inserirle correttamente? per farlo poi andare con pure data con oscp5

/* OpenProcessing Tweak of *@*http://www.openprocessing.org/sketch/9456*@* */
/* !do not delete the line above, required for linking your tweak if you upload again */
int imageCount = 112;
float x = 35.7;
float y = 41.6;
int counter, prevCounter;

PImage[] picture = new PImage[imageCount];
Area[] area = new Area[imageCount];

void setup() {
  size(500, 333);
  rectMode(CENTER);

  for (int i=0; i<imageCount; i++) {
    float a = (i % floor(width/x)) * x + x/2;
    float b = (i / floor(width/x)) * y + y/2;
    area[i] = new Area(i, a, b);
  }
  
  counter = 63;
}

void draw() {

  for (int i = 0; i < area.length; i++) {
    area[i].update();
  }

  if (counter != prevCounter) {
    if (picture[counter] != null) {
      image(picture[counter], 0, 0);
    }
    else {
      picture[counter] = loadImage("ME" + counter + ".JPG");
      image(picture[counter], 0, 0);
    }
  }
  prevCounter = counter;
}


2 sketch Area

class Area {
  float widthX = 35.7;
  float heightY = 41.6;
  float xPosition, yPosition;
  int id;
  boolean active;

  Area(int i, float xpos, float ypos) {
    id = i;
    xPosition = xpos;
    yPosition = ypos;
  }

  void update() {
    if(dist(xPosition, yPosition, mouseX, mouseY) < 20) {
      //fill(0);
      counter = id;
      active = true;
    }
    else {
      //fill(255);
      active = false;
    }
    //rect(xPosition, yPosition, widthX, heightY);
  }

}

ora devo inserire questi dati:

  1. importa libreria meni>menù > sketch > import library >oscP5
import oscP5.*;
import netP5.*;

OscP5 oscP5;
NetAndress my RemoteLocation;
  1. definire due variabile globale (firstValue, second Value)
    che servono per i dati che arrivano a pure data (pozione x,y)
int firstValue , secondValue;

3)sostituzione di variabili (firstValue, secondValue) con mouseX, mouseY nella classe "area"

void update(){
  if(dist(xPosition, yPosition, firstValue) < 20) {
    counter = id;
    active = true;
  }

4)Definire una funzione che riceve dati da osc

 void oscEvent(OscMessage theOscMessage){
  if(theOscMessage.checkAddrPattern("/x")==true){
    if(theOscMessage.checkTypetag("i")){
      firstValue=theOscMessage.get(0).intValue();
      println("X: "+firstValue);
      return;
    }

ok questo è lo sketck e le istruzioni potete aiutarmi a dove inserirle ? o madarmi lo sketch modificato e incollato qui? di entrambi? 1 e dell area??

grazie a tutti >.<
e per un esame che ho il 6 luglio please

  1. Il codice devi racchiuderlo nei tag code, vedi sezione 7 del regolamento, spiega bene come fare, altrimenti parte del codice viene visualizzato male (non hai notato che ad un certo punto diventa italico e si perde dei pezzi? )

  2. Questo è un forum di Arduino, non molti conosco Processing. E chiedi anche di Pure Data/Osc5.
    Non sò quanti sapranno risponderti. Hai provato forum di Processing ?

Mi spiace dirtelo ma sei OT. Qui si può parlare di Processing fintanto che riguarda l'uso combinato con Arduino.
Ti rimando al forum ufficiale di Processing

devo fare si che non vega seguito con il mouse ma con periferica kinect

con seguente stringa
import codeanticode.gsvideo.*;

import oscP5.;
import netP5.
;

OscP5 oscP5;
NetAddress myRemoteLocation;

void setup() {
size(500, 333);
// start oscP5, telling it to listen for incoming messages at port 8000 */
oscP5 = new OscP5(this,12000);
// set the remote location to be the IP address of my phone on port 9000
myRemoteLocation = new NetAddress("127.0.0.1",12346);

ma appena la inserisco mi da errore di copia void setup