Bitwig Studio Control Surface API  5.0.11
MultiStateHardwareLight Interface Reference
+ Inheritance diagram for MultiStateHardwareLight:

Public Member Functions

ObjectHardwareProperty< InternalHardwareLightStatestate ()
 
void setColorToStateFunction (Function< Color, InternalHardwareLightState > function)
 
void setColor (Color color)
 
void setColorSupplier (Supplier< Color > colorSupplier)
 
InternalHardwareLightState getBestLightStateForColor (Color color)
 
- Public Member Functions inherited from HardwareOutputElement
void onUpdateHardware (Runnable sendStateRunnable)
 
- Public Member Functions inherited from HardwareElement
String getId ()
 
String getLabel ()
 
void setLabel (String label)
 
Color getLabelColor ()
 
void setLabelColor (Color color)
 
RelativePosition getLabelPosition ()
 
void setLabelPosition (RelativePosition position)
 
void setBounds (double xInMM, double yInMM, double widthInMM, double heightInMM)
 
double getX ()
 
double getY ()
 
double getWidth ()
 
double getHeight ()
 

Detailed Description

Represents a physical hardware light on a controller. The light has an on/off state and may also be optionally colored.

Since
API version 10

Member Function Documentation

◆ getBestLightStateForColor()

InternalHardwareLightState getBestLightStateForColor ( Color  color)

Determines the best light state for the supplied color. For this to be used you must first call setColorToStateFunction(IntFunction).

◆ setColor()

void setColor ( Color  color)

Tries to set this light's state to be the best state to represent the supplied Color. For this to be used you must first call setColorToStateFunction(IntFunction).

◆ setColorSupplier()

void setColorSupplier ( Supplier< Color colorSupplier)

Tries to set this light's state to be the best state to represent the value supplied by the Supplier. For this to be used you must first call setColorToStateFunction(IntFunction).

◆ setColorToStateFunction()

void setColorToStateFunction ( Function< Color, InternalHardwareLightState function)

Sets a function that can be used to convert a color to the closest possible state representing that color. Once this function has been provided it is possible to then use the convenient setColor(Color) and setColorSupplier(Supplier) methods.

◆ state()

Object that represents the current state of this light. The interpretation of this value is entirely up to the implementation.


The documentation for this interface was generated from the following file: