GMLineMultiSlider is an easy to use customisable multi slider.
It inherits from the GMZZMultiSlider class, and is only responsible for graphical specifications. See GMZZSlider and GMZZMultiSlider for non-graphical properties settings.
This class is a distant extension of the GMFaderSlider class. Methods that those two classes share are not documented here.
Although this class is similar to the GMFaderMultiSlider and GMSymbolMultiSlider, the way it is displayed makes discrete values harder to distinguish.
This class was primarily designed to control an Env levels
, in the special case where all its times
are equals, and its curves
are linear only.
Even if this class was not intended to be used this way, it can be used, if needed, as a sequencer control.
First, it is possible to highlight some values so one can distinguish important times at first glance. Those highlights are specified using an array of float between 0 and 1, that should be the size of the values. The higher the value is, the bigger and opaque the highlight will be.
A 4/4 signature highlight :
A 6/8 signature highlight :
In addition, specifying a beat
property will also highlight the associated slider. One can use a Routine (or any TempoClock based algorithm) to dynamically display the current beat. The graphical update is internally deferred.
Creates a new instance of GMFaderMultiSlider.
By default, its graphical properties are defined by its associated GMStyle. This means that creating multi sliders with different colors implies creating multiples GMStyle. The sliders color corresponds to the mainColor
property. The font color of the displayed value corresponds to the valueFontColor
property.
a GMFaderMultiSlider instance.
Sets or gets the displayed beat. Set to -1
to disable. This will internally defer the graphical update.
Sets or gets wether the highlights should be displayed.
Sets or gets the highlights maximum ratio relative to the sliders available space.
Sets or gets the highlights weights. A weight of 1 will cause the highlight to be drawn at the maximum ratio, using the GMStyle highlightColor
alpha value. Lower values will linearily decrease both the ratio and the alpha values.
Sets or gets wether dots should be displayed on the line to highlight the value position.
Sets or gets the dot size relative to the sliders available space.
Sets or gets wether the surface under the line should be filled. Uses the GMStyle secondColor
property.
Sets or gets wether extremities of the line 'wrap around'. Mostly useful when controlling a looping enveloppe.
See the GMFaderSlider class documentation for those methods.
A simple interface that controls the enveloppe of the emitted sound :
Used to control a looping parameter :