fader movement
in
Contributed Library Questions
•
1 years ago
any quick fix on the fader ellipse relationship in this patch?
When the fader goes down, the ellipse goes up and visa versa.. any ideas how to switch this?
cheers, josh
- import controlP5.*;
- ControlP5 controlP5;
- Knob myDial;
- Slider mySlider;
- int sliderValue = 100;
- int knobValue = 100;
- void setup() {
- size(900,400);
- smooth();
- controlP5 = new ControlP5(this);
- myDial = controlP5.addKnob("knobValue",0,width,315,250,30);
- mySlider = controlP5.addSlider("sliderValue",0,200,200,320,298,25,100);
- }
- void draw() {
- background(0);
- fill(255,0,0);
- ellipse(knobValue,sliderValue,30,30);
- }
1