MLSliders Plugin

From Cinemar Wiki
Jump to: navigation, search


MLSlider provides for more detailed control over a MainLobby3 graphical slider.

You have the ability to define 16 unique sliders. Each slider can be assigned a numeric range (e.g. -100 .. +100), an alpha range (e.g. A .. Z) or a user defined range (e.g. A,B,C,D,E,F).

This driver allows you to define up to 16 slider configurations.


MLSliders is a standard plugin that is installed with MLServer3. During an MLServer initial or subsequent update install, the installer will provide option to install additional components. MLSlider is one of these choices.


Plugin Syntax:

MLServeCmd.MLSliders|Set~Slider #~SliderVal

Commands supported: SET~Slider#~SliderVal Where Slider# = 1..16, SliderVar = 0..100

Actual Command:


The plugin accepts one command called Set


Where: SliderNum = 1 .. 16 SliderVal = 0 .. 100

If you have slider #1 defined as a numeric slider with a range of -100 to 100 and you issued a MLSlider|Set~1~50 the server variable associated with the slider would be set to 0 which is 50% of the range.

Likewise if you have slider #2 defined as an alpha slider with a range of A .. E and you issued a MLSlider|Set~2~40 the server variable associated with the slider would be set to B which is 40% of the range.

This will allow you to use sliders that have a fixed range of 0 to 100 to generate your own custom ranges. There is an update to this plugin in the works that will allow you to insert {{servervars}} in all the fields and also define a MLServeCmd to be fired when the slider is set.

If you need to create a slider for a specific range like 0 - 31, as in the case of some volume controls, additional variables will be required to keep the slider graphic in synch with the actual value. Slider graphics work on percentage, so when you pass a value of 31 in this example to the device variable, the slider will only move 31% up the scale, even though the volume level of your device is at maximum. The slider graphic will also bounce around when being set from a touch screen. The solution is to have the slider see the scale of 0-100, but to still only pass a value of 0-31 to your device.

The solution:

Variables used in this example:

MRC8_Zone1Vol - The value from 0-31 that is sent to the device

MRC8_Slide1_Val - The true value of the slider on a scale of 0-100

  • Note: These variable names are open form and can be anything you choose.

In MLSlider:

Type - Numeric

Nin = 0

Max = 31

Server Var: MRC8_Zone1Vol

Command: MLServeCmd.MLGenericDevice|MRC8~Volume~1~<<value>>

  • Note: You are passing <<value>> which is the value of the slider on a scale of 0-100 that has been re-valued to a scale of 0-31 (or whatever scale you choose). MLSliders does the math for you.

In the slider: Slider graphic label is: {{MRC8_Slide1_Val}} **NOT {{MRC8_Zone1Vol}}

Command is: MLServeCmd.Macro|MLSliders|Set~1~{{value}}!SetVariable|MRC8_Slide1_Val~{{value}}


New Feature Requests