summaryrefslogtreecommitdiffstats
path: root/libraries/oscP5/examples/oscP5broadcastTester
diff options
context:
space:
mode:
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);
+}