modulii

modulii

Button icon

Button

Buttons are simple controls that track whether they are pressed or unpressed. They can cycle through up to 16 states. Set the number of states to 2 to use the button as a toggle or switch.


Settings

SettingDescription
TextThe label displayed on the button (optional)
Number of StatesThe number of states the button can cycle through (1 to 16). When set to 1, the button can only be pressed and released. When set to 2, the button acts as a toggle or switch.
State Change TimingDetermines when the button changes state. "On Press" changes the state when the button is pressed down. "On Release" changes the state when the button is released. This setting has no effect if the number of states is 1.

Variables

The following variables can be used when configuring outputs for this control:

VariableDescription
Is Pressed`1` if the button is currently pressed; `0` otherwise
ValueThe current state of the button

OSC Messages

This control responds to the following OSC messages:

MessageDescription
<address> position <x> <y> <width> <height>Sets the control's position. Coordinates are specified in pixels.
<address> color <blue|red|green|orange|purple|brown|grey>Sets the control's color.
<address> text <string>Sets the button's label (only shows when numStates is 1, otherwise the current state is shown)
<address> numStates <count>Sets the number of states for the button (up to 16)
<address> state <integer>Sets the current state of the button
<address> <integer>Sets the current state of the button