Additional Attritbues

  • isVertical : whether the slider is vertical or horizontal. This does not affect the dimensions of the slider, it only affects the drawing of the fill and how the value of the slider is determined by touch position. The default value is false.
  • isXFader : whether or not the slider is a crossfader. The default value is false. This does not affect functionality or output in any way; it only changes the drawing of the slider from a filled bar indicating value to a thin rectangle.

Simple JSON

    "x":0, "y":0,
    "width":.75, "height":.25,

This creates a Slider with the default range of 0 to 1, an OSC address of “/mySlider”, a MIDI channel of 1 outputting control change number 0. The color for both the stroke and the fill is white (the default). It is horizontal and is not a crossfader.

More Code

    "name" : "mySlider",
    "type" : "Slider",
    "x" : 0, "y" : 0,
    "width" : .25, "height" : .75,
    "min" : -1, "max" : 1,
    "address" : "/filterCutoff",
    "isVertical" : true,
    "isXFader" : false,
    "midiType" : "cc",
    "channel"  : 10,
    "midiNumber"   : 55,
    "onvaluechange" : "filterCutoffLabel.changeValue(this.value);"

This creates a vertically oriented slider that is not a crossfader. Whenever the value of the slider changes, it updates the value of a hypothetical label named “filterCutoffLabel”.

This work is licensed under GPL - 2009 | Powered by Wordpress using a heavily modified version of the theme aav1