fader1#
variableoav-p5fader1Also: fader2 fader3 fader4 fader5 fader6 fader7 fader8
The position of a controller fader (slider), from 0 to 1: fader1 is the first fader, up to fader8.
Works exactly like knob1, for the controller's faders, numbered in the order the controller's profile lists them (as printed on the device). A controller with only four faders, like the MiniLab 3, has fader1 to fader4.
- Type
Number- Range
0..1
Changes when the fader moves; 0 until it has moved.
Before it has a value
Nothing to call. Web MIDI is asked for at load, exactly as for a knob (knob1); reading a fader also makes a missing or refused Web MIDI show as a card.
Examples
function setup() {
createCanvas(400, 300);
}
function draw() {
background(20);
fill(255);
rect(40, height - 40, fader1 * (width - 80), 24); // fader 1 is a level bar
}Related
fader()Returns the position of fader numbern, from 0 to 1: the same asfader1tofader8, for anyn.knob1The position of a controller knob, from 0 to 1:knob1is the first knob,knob2the second, up toknob8.faderMoved()You define this function; oav-p5 calls it whenever a fader moves.