The slider box allows to select a value in a given range with a slider interface.
The slider has five inputs and outputs :
|
To complete the slider's setting :
enter values in the inputs data boxes
evaluate the box
lock the box afterwards to avoid resetting the values at subsequent evaluations.
Note that the slider orientation might not be taken into account if it is incompatible with the box's size. A horizontal slider can be "resized vertically".
The range, step and value inputs can be used to set the slider. The initial value is modified when the user moves the slider.
The slider's outputs give access to the different properties of the slider box.
In particular, the fourth "value" output returns a slider's position's current value.
The "action" input of the slider can be used for triggering an operation that will integrate the "value" input, that is, the slider's position, as a parameter.
The "action" input must be connected to a function or a box on "lambda" mode with one input or argument. When the slider is moved, this function is called with the value of the "value" input as argument. To set or modify the function associated with the slider :
|
The "range" input takes midi values from 48 to 72 – C3 to C5.
The "step" value is equal to 1, so that each step of the slider corresponds to a semi-tone.
The "initial value" of the slider is equal to 48, the lowest pitch of the range.
The patch on "lambda" mode is a very simple program that applies the slider's value to the pitch input of the send-midi-note function.
When the slider is moved, the note played by send-midi-note matches the value of the slider.