Commits

Jim  committed 012fbe0

changed back to instatiation in the function, no Bundle

  • Participants
  • Parent commits c0f4d94

Comments (0)

Files changed (1)

File engulferator04.pde

 int sndNum = 16;
 int bNum = 4;
 // OscBundle myBundle = new OscBundle();
-OscMessage[] sndPos = new OscMessage[sndNum];
+// OscMessage[] sndPos = new OscMessage[sndNum];
 
 float[] bx = new float[bNum];
 float[] by = new float[bNum];
   snd = new Particle[sndNum];
   for (int i=0; i<sndNum; i++) {
     snd[i] = physics.makeParticle( 1.0, random( 0, width+10 ), random( 0, height+50 ), 0 );
-    sndPos[i] = new OscMessage["/"+i];
+    // sndPos[i] = new OscMessage["/"+i];
   }
   for(int i=0; i<sndNum; i++) {
     for (int j=0; j<sndNum; j++) {
 }
 
 void sendOSC(int i) {
-    sndPos[i].add(snd[i].position().x());
+  OscMessage sndPos = new OscMessage("/"+i);
+    sndPos.add(snd[i].position().x());
     //myBundle.add(myMessage);
     //myMessage.clear();
-    sndPos[i].add(snd[i].position().y());
+    sndPos.add(snd[i].position().y());
     //myBundle.add(myMessage);
-    oscP5.send(sndPos[i], processLocation);
+    oscP5.send(sndPos, processLocation);
     //myBundle.clear();
 
 }