GMLineMultiSlider:
Filter:
GraphicalModule/Classes (extension) | GUI > Graphical Module

GMLineMultiSlider
ExtensionExtension

A multi slider class that supports sequencer utilities

Description

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.

A note about this documentation

This class is a distant extension of the GMFaderSlider class. Methods that those two classes share are not documented here.

Usage

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.

Sequencer interface

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.

Class Methods

.new

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.

Returns:

a GMFaderMultiSlider instance.

Instance Methods

.beat

Sets or gets the displayed beat. Set to -1 to disable. This will internally defer the graphical update.

.drawHighlights

Sets or gets wether the highlights should be displayed.

.highlightRatio

Sets or gets the highlights maximum ratio relative to the sliders available space.

.highlights

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.

.drawDots

Sets or gets wether dots should be displayed on the line to highlight the value position.

.dotsRatio

Sets or gets the dot size relative to the sliders available space.

.fillShape

Sets or gets wether the surface under the line should be filled. Uses the GMStyle secondColor property.

.joinExtremities

Sets or gets wether extremities of the line 'wrap around'. Mostly useful when controlling a looping enveloppe.

GMFaderSlider Methods

See the GMFaderSlider class documentation for those methods.

.displayValues

.centerValues

.roundValue

.displayFunction

.fontRatio

.drawHelpers

.helpersStyle

.helpersRatio

.centerHelpers

Internal Methods

.draw

.prDrawSliders

.prFillShape

.prDrawHighlights

.prDrawValues

Examples

A simple interface that controls the enveloppe of the emitted sound :

Used to control a looping parameter :