summaryrefslogtreecommitdiffstats
path: root/libraries/oscP5/examples/oscP5broadcastTester
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2015-12-31 03:34:08 +0100
committerDavid Runge <dave@sleepmap.de>2015-12-31 03:34:08 +0100
commit589e6c881bd2cf11e8615e9c1bf8cb4012293bad (patch)
tree407d617ed861a61d64e64f7d581052f90b10e981 /libraries/oscP5/examples/oscP5broadcastTester
parent6a713ba6966eee4cf7bb9fb9e1513918fc94b528 (diff)
downloadprocessing-sketchbook-589e6c881bd2cf11e8615e9c1bf8cb4012293bad.tar.gz
processing-sketchbook-589e6c881bd2cf11e8615e9c1bf8cb4012293bad.tar.bz2
processing-sketchbook-589e6c881bd2cf11e8615e9c1bf8cb4012293bad.tar.xz
processing-sketchbook-589e6c881bd2cf11e8615e9c1bf8cb4012293bad.zip
libraries/oscP5: Adding oscP5 library for OSC capabilities.
Diffstat (limited to 'libraries/oscP5/examples/oscP5broadcastTester')
-rw-r--r--libraries/oscP5/examples/oscP5broadcastTester/oscP5broadcastTester.pde27
1 files changed, 27 insertions, 0 deletions
diff --git a/libraries/oscP5/examples/oscP5broadcastTester/oscP5broadcastTester.pde b/libraries/oscP5/examples/oscP5broadcastTester/oscP5broadcastTester.pde
new file mode 100644
index 0000000..440e7cd
--- /dev/null
+++ b/libraries/oscP5/examples/oscP5broadcastTester/oscP5broadcastTester.pde
@@ -0,0 +1,27 @@
+import controlP5.*;
+
+
+ControlP5 controlP5;
+
+int myColorBackground = color(0,0,0);
+
+int knobValue = 100;
+
+void setup() {
+ size(400,400);
+ smooth();
+ controlP5 = new ControlP5(this);
+ controlP5.addKnob("knob",100,200,128,100,160,40);
+ controlP5.addKnob("knobValue",0,255,128,100,240,40);
+}
+
+void draw() {
+ background(myColorBackground);
+ fill(knobValue);
+ rect(0,0,width,100);
+}
+
+void knob(int theColor) {
+ myColorBackground = color(theColor);
+ println("a knob event. setting background to "+theColor);
+}