From 589e6c881bd2cf11e8615e9c1bf8cb4012293bad Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 31 Dec 2015 03:34:08 +0100 Subject: libraries/oscP5: Adding oscP5 library for OSC capabilities. --- .../oscP5broadcastTester/oscP5broadcastTester.pde | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 libraries/oscP5/examples/oscP5broadcastTester/oscP5broadcastTester.pde (limited to 'libraries/oscP5/examples/oscP5broadcastTester') 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); +} -- cgit v1.2.3-70-g09d2