Permalink
Browse files

Processing example added

  • Loading branch information...
1 parent b85cdef commit e248840a90f0b1ff55ffb081d825717249b1ff4d @ellensundh committed Jun 26, 2012
Showing with 2 additions and 1,175 deletions.
  1. +2 −0 .gitignore
  2. BIN OscDemo/.DS_Store
  3. BIN OscDemo/Helvetica-Bold-18.vlw
  4. +0 −104 OscDemo/OscDemo.pde
  5. BIN OscDemo/applet/OscDemo.jar
  6. +0 −113 OscDemo/applet/OscDemo.java
  7. +0 −85 OscDemo/applet/OscDemo.pde
  8. BIN OscDemo/applet/RXTXcomm.jar
  9. BIN OscDemo/applet/core.jar
  10. +0 −131 OscDemo/applet/index.html
  11. BIN OscDemo/applet/loading.gif
  12. BIN OscDemo/applet/oscP5.jar
  13. BIN OscDemo/applet/serial.jar
  14. +0 −4 OscDemo/application.linux32/OscDemo
  15. BIN OscDemo/application.linux32/lib/OscDemo.jar
  16. BIN OscDemo/application.linux32/lib/RXTXcomm.jar
  17. BIN OscDemo/application.linux32/lib/core.jar
  18. BIN OscDemo/application.linux32/lib/oscP5.jar
  19. BIN OscDemo/application.linux32/lib/serial.jar
  20. BIN OscDemo/application.linux32/librxtxSerial.so
  21. +0 −104 OscDemo/application.linux32/source/OscDemo.pde
  22. +0 −4 OscDemo/application.linux64/OscDemo
  23. BIN OscDemo/application.linux64/lib/OscDemo.jar
  24. BIN OscDemo/application.linux64/lib/RXTXcomm.jar
  25. BIN OscDemo/application.linux64/lib/core.jar
  26. BIN OscDemo/application.linux64/lib/oscP5.jar
  27. BIN OscDemo/application.linux64/lib/serial.jar
  28. BIN OscDemo/application.linux64/librxtxSerial.so
  29. +0 −104 OscDemo/application.linux64/source/OscDemo.pde
  30. +0 −75 OscDemo/application.macosx/OscDemo.app/Contents/Info.plist
  31. BIN OscDemo/application.macosx/OscDemo.app/Contents/MacOS/JavaApplicationStub
  32. BIN OscDemo/application.macosx/OscDemo.app/Contents/MacOS/JavaApplicationStub64
  33. +0 −1 OscDemo/application.macosx/OscDemo.app/Contents/PkgInfo
  34. BIN OscDemo/application.macosx/OscDemo.app/Contents/Resources/Java/OscDemo.jar
  35. BIN OscDemo/application.macosx/OscDemo.app/Contents/Resources/Java/RXTXcomm.jar
  36. BIN OscDemo/application.macosx/OscDemo.app/Contents/Resources/Java/core.jar
  37. BIN OscDemo/application.macosx/OscDemo.app/Contents/Resources/Java/librxtxSerial.jnilib
  38. BIN OscDemo/application.macosx/OscDemo.app/Contents/Resources/Java/oscP5.jar
  39. BIN OscDemo/application.macosx/OscDemo.app/Contents/Resources/Java/serial.jar
  40. BIN OscDemo/application.macosx/OscDemo.app/Contents/Resources/sketch.icns
  41. +0 −104 OscDemo/application.macosx/source/OscDemo.pde
  42. BIN OscDemo/application.windows32/OscDemo.exe
  43. BIN OscDemo/application.windows32/lib/OscDemo.jar
  44. BIN OscDemo/application.windows32/lib/RXTXcomm.jar
  45. +0 −3 OscDemo/application.windows32/lib/args.txt
  46. BIN OscDemo/application.windows32/lib/core.jar
  47. BIN OscDemo/application.windows32/lib/oscP5.jar
  48. BIN OscDemo/application.windows32/lib/serial.jar
  49. BIN OscDemo/application.windows32/rxtxSerial.dll
  50. +0 −132 OscDemo/application.windows32/source/OscDemo.java
  51. +0 −104 OscDemo/application.windows32/source/OscDemo.pde
  52. BIN OscDemo/application.windows64/OscDemo.exe
  53. BIN OscDemo/application.windows64/lib/OscDemo.jar
  54. BIN OscDemo/application.windows64/lib/RXTXcomm.jar
  55. +0 −3 OscDemo/application.windows64/lib/args.txt
  56. BIN OscDemo/application.windows64/lib/core.jar
  57. BIN OscDemo/application.windows64/lib/oscP5.jar
  58. BIN OscDemo/application.windows64/lib/serial.jar
  59. BIN OscDemo/application.windows64/rxtxSerial.dll
  60. +0 −104 OscDemo/application.windows64/source/OscDemo.pde
View
@@ -0,0 +1,2 @@
+.DS_Store*
+Thumbs.db
View
Binary file not shown.
Binary file not shown.
View
@@ -1,104 +0,0 @@
-import oscP5.*;
-import netP5.*;
-import processing.serial.*;
-import java.awt.*;
-
-OscP5 oscP5;
-
-NetAddress myBroadcastLocation;
-
-Panel panel1 = new Panel();
-
-TextField textField = new TextField("/eventtest", 16);
-TextField textField2 = new TextField("3", 16);
-TextField porttf = new TextField("12000", 5);
-float currentValue = 0;
-float counter = 2;
-float toggle = 0;
-
-void setup() {
- size(400,140);
- frameRate(25);
-
- oscP5 = new OscP5(this,12000);
- myBroadcastLocation = new NetAddress("127.0.0.1",8000);
-
-
- add(panel1);
- add(textField);
- add(textField2);
-
- panel1.setLayout(new BorderLayout());
- panel1.setBounds(150,100,50,50);
-
-}
-
-boolean overButton(int x, int y, int width, int height)
-{
- if (mouseX >= x && mouseX <= x+width &&
- mouseY >= y && mouseY <= y+height) {
- return true;
- } else {
- return false;
- }
-}
-
-
-
-void draw() {
- background(0);
-
- fill(33, 33,33);
- rect(140, 40, 115, 35);
-
- PFont font = loadFont("Helvetica-Bold-18.vlw");
- textFont(font,18);
- fill(255, 255,255);
- text("Send event",150, 50, 200, 70);
-
- textFont(font,10);
- fill(255, 255,255);
- text("Dispatches event to 127.0.0.1 port 8000 Send counter value: " + counter,100, 100, 200, 70);
- sendCounter();
-}
-
-
-void mousePressed() {
- if( overButton(140, 40, 115, 35)) {
- sendEvent(textField.getText(),textField2.getText());
- }
-}
-
-void sendEvent(String eventName, String eventData) {
- OscMessage myOscMessage = new OscMessage("/eventTest");
- myOscMessage.add(eventData);
- oscP5.send(myOscMessage, myBroadcastLocation);
-}
-
-void sendCounter() {
- OscMessage myOscMessage = new OscMessage("/counterTest");
-
- if(counter == 50) {
- toggle = 1;
- } else if(counter == 2) {
- toggle = 0;
- }
-
- if(toggle == 0) {
- counter++;
- } else if(toggle == 1) {
- counter--;
- }
- println(counter);
- myOscMessage.add(counter);
- oscP5.send(myOscMessage, myBroadcastLocation);
-}
-
-
-void oscEvent(OscMessage theOscMessage) {
- /* get and print the address pattern and the typetag of the received OscMessage */
- println("### received an osc message with addrpattern "+theOscMessage.addrPattern()+" and typetag "+theOscMessage.typetag());
- theOscMessage.print();
-}
-
-
View
Binary file not shown.
View
@@ -1,113 +0,0 @@
-import processing.core.*;
-import processing.xml.*;
-
-import oscP5.*;
-import netP5.*;
-import processing.serial.*;
-import java.awt.*;
-
-import java.applet.*;
-import java.awt.Dimension;
-import java.awt.Frame;
-import java.awt.event.MouseEvent;
-import java.awt.event.KeyEvent;
-import java.awt.event.FocusEvent;
-import java.awt.Image;
-import java.io.*;
-import java.net.*;
-import java.text.*;
-import java.util.*;
-import java.util.zip.*;
-import java.util.regex.*;
-
-public class OscDemo extends PApplet {
-
-
-
-
-
-
-OscP5 oscP5;
-
-NetAddress myBroadcastLocation;
-
-Panel panel1 = new Panel();
-
-TextField textField = new TextField("eventname", 16);
-TextField textField2 = new TextField("eventdata", 16);
-TextField porttf = new TextField("12000", 5);
-
-
-
-
-
-public void setup() {
- size(400,140);
- frameRate(25);
-
- oscP5 = new OscP5(this,12000);
- myBroadcastLocation = new NetAddress("127.0.0.1",8000);
-
-
- add(panel1);
- add(textField);
- add(textField2);
-
- panel1.setLayout(new BorderLayout());
- panel1.setBounds(150,100,50,50);
-
-}
-
-public boolean overButton(int x, int y, int width, int height)
-{
- if (mouseX >= x && mouseX <= x+width &&
- mouseY >= y && mouseY <= y+height) {
- return true;
- } else {
- return false;
- }
-}
-
-
-
-public void draw() {
- background(0);
-
- fill(33, 33,33);
- rect(140, 40, 115, 35);
-
- PFont font = loadFont("Helvetica-Bold-18.vlw");
- textFont(font,18);
- fill(255, 255,255);
- text("Send event",150, 50, 200, 70);
-
- textFont(font,10);
- fill(255, 255,255);
- text("Dispatces event to 127.0.0.1 port 8000",100, 100, 200, 70);
-}
-
-
-public void mousePressed() {
- if( overButton(140, 40, 115, 35)) {
- sendEvent(textField.getText(),textField2.getText());
- }
-}
-
-public void sendEvent(String eventName, String eventData) {
-
-
- OscMessage myOscMessage = new OscMessage(eventName + "/" + eventData);
- oscP5.send(myOscMessage, myBroadcastLocation);
-}
-
-public void oscEvent(OscMessage theOscMessage) {
- /* get and print the address pattern and the typetag of the received OscMessage */
- println("### received an osc message with addrpattern "+theOscMessage.addrPattern()+" and typetag "+theOscMessage.typetag());
- theOscMessage.print();
-}
-
-
- static public void main(String args[]) {
- PApplet.main(new String[] { "--bgcolor=#FFFFFF", "OscDemo" });
- }
-}
View
@@ -1,85 +0,0 @@
-import oscP5.*;
-import netP5.*;
-import processing.serial.*;
-import java.awt.*;
-
-OscP5 oscP5;
-
-NetAddress myBroadcastLocation;
-
-Panel panel1 = new Panel();
-
-TextField textField = new TextField("eventname", 16);
-TextField textField2 = new TextField("eventdata", 16);
-TextField porttf = new TextField("12000", 5);
-
-
-
-
-
-void setup() {
- size(400,140);
- frameRate(25);
-
- oscP5 = new OscP5(this,12000);
- myBroadcastLocation = new NetAddress("127.0.0.1",8000);
-
-
- add(panel1);
- add(textField);
- add(textField2);
-
- panel1.setLayout(new BorderLayout());
- panel1.setBounds(150,100,50,50);
-
-}
-
-boolean overButton(int x, int y, int width, int height)
-{
- if (mouseX >= x && mouseX <= x+width &&
- mouseY >= y && mouseY <= y+height) {
- return true;
- } else {
- return false;
- }
-}
-
-
-
-void draw() {
- background(0);
-
- fill(33, 33,33);
- rect(140, 40, 115, 35);
-
- PFont font = loadFont("Helvetica-Bold-18.vlw");
- textFont(font,18);
- fill(255, 255,255);
- text("Send event",150, 50, 200, 70);
-
- textFont(font,10);
- fill(255, 255,255);
- text("Dispatces event to 127.0.0.1 port 8000",100, 100, 200, 70);
-}
-
-
-void mousePressed() {
- if( overButton(140, 40, 115, 35)) {
- sendEvent(textField.getText(),textField2.getText());
- }
-}
-
-void sendEvent(String eventName, String eventData) {
-
-
- OscMessage myOscMessage = new OscMessage(eventName + "/" + eventData);
- oscP5.send(myOscMessage, myBroadcastLocation);
-}
-
-void oscEvent(OscMessage theOscMessage) {
- /* get and print the address pattern and the typetag of the received OscMessage */
- println("### received an osc message with addrpattern "+theOscMessage.addrPattern()+" and typetag "+theOscMessage.typetag());
- theOscMessage.print();
-}
-
-
View
Binary file not shown.
View
Binary file not shown.
Oops, something went wrong.

0 comments on commit e248840

Please sign in to comment.