void knob() definition.
in
Contributed Library Questions
•
1 year ago
I can see the void draw() method in Processing Reference and as this i can see all the method i used.
Now i stated to using ControlP5.
So this is an example of code
- import controlP5.*;
- ControlP5 controlP5;
- int myColorBackground = color(0,0,0);
- int knobValue = 100;
- Knob myKnobA;
- Knob myKnobB;
- void setup() {
- size(400,400);
- smooth();
- controlP5 = new ControlP5(this);
- myKnobA = controlP5.addKnob("knob",100,200,128,100,160,40);
- myKnobB = controlP5.addKnob("knobValues",0,255,128,100,240,40);
- }
- void draw() {
- background(myColorBackground);
- fill(knobValue);
- rect(0,0,width,100);
- }
- void knob(int theValue) {
- myColorBackground = color(theValue);
- println("a knob event. setting background to "+theValue);
- myKnobB.setValue(theValue);
- }
- void keyPressed() {
- myKnobA.setValue(150);
- }
Where i can see the reference info for void knob()?
In this page:
http://www.sojamo.de/libraries/archive/controlP5-0-3-14/reference/index.htm i cannot see any information.
Thanks!
1