Recherche Google
OpenMusic 6 – User ManualOM Objects > OM Basic Objects > Dialog Items > Slider Box
previous pagenext page

Controlling Values (1) : Slider Box

Features

The slider box allows to select a value in a given range with a slider interface.

It has five inputs and outputs :

  1. " direction " : the slider's vertical or horizontal orientation.

  2. " range " : the slider's range, from a minimum to a maximum value.

  3. " step " : the precision of the slider – should be equal to 1.

  4. " initial value " : initial position of the slider.

  5. " action " : an action to perform by a lambda function or patch.

Settings

Completing the Slider's Setting

To complete the slider's setting :

  1. enter values in the inputs data boxes

  2. evaluate the box

  3. lock the box afterwords to avoid resetting the values at subsequent evaluations.

"Direction" Input

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".

Slider's Value(s)

The slider's outputs give access to the values of the slider box. In particular, the fourth output , or "value" output, returns a value corresponding to the current slider position.

Using the "Action" and "Value" Inputs

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 menu :

  1. connect the box or function to the fifth input,

  2. evaluate the slider box .

A Musical Application
  • 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.

previous pagenext page
About...(c) Ircam - Centre PompidouMade with Scenari