Package heronarts.lx.output
Class LXOutput
java.lang.Object
heronarts.lx.LXComponent
heronarts.lx.output.LXOutput
- All Implemented Interfaces:
LXPath
,LXSerializable
,LXParameterListener
- Direct Known Subclasses:
LXBufferOutput
,LXOutputGroup
,LXStructureOutput
This class represents the output stage from the LX engine to real devices.
Outputs may have their own brightness, be enabled/disabled, be throttled,
etc.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static class
static interface
Nested classes/interfaces inherited from class heronarts.lx.LXComponent
LXComponent.Hidden, LXComponent.Placeholder, LXComponent.Renamable
Nested classes/interfaces inherited from interface heronarts.lx.LXSerializable
LXSerializable.Utils
-
Field Summary
Modifier and TypeFieldDescriptionfinal CompoundParameter
Brightness of the outputfinal BooleanParameter
Whether the output is enabled.final BoundedParameter
Framerate throttlefinal BoundedParameter
Gamma correction levelfinal EnumParameter<LXOutput.GammaMode>
Gamma table mode, whether to inherit gammastatic final float
final DiscreteParameter
White point scaling for blue pixelsfinal DiscreteParameter
White point scaling for green pixelsfinal DiscreteParameter
White point scaling for red pixelsfinal DiscreteParameter
White point scaling for white pixels (if present)Fields inherited from class heronarts.lx.LXComponent
children, internalParameters, KEY_CHILDREN, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_INTERNAL, KEY_PARAMETER_PATH, KEY_PARAMETERS, KEY_PATH, KEY_RESET, label, legacyInternalParameters, legacyParameters, lx, modulationColor, modulationControlsExpanded, modulationsExpanded, parameters, presetFile
Fields inherited from interface heronarts.lx.LXPath
ROOT, ROOT_PREFIX, ROOT_SLASH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic final void
static final void
void
load
(LX lx, JsonObject obj) Loads the LX component.static final void
void
Subclasses are free to override this if desired.protected abstract void
onSend
(int[] colors, LXOutput.GammaTable glut, double brightness) Subclasses implement this to send the data.send
(int[] colors) Sends data to this output, applying throttle and color correctionfinal LXOutput
send
(int[] colors, double brightness) Sends data to this output at the pre-corrected brightnessvoid
setGammaDelegate
(LXOutput gammaDelegate) void
setGammaTable
(byte[][] gammaLut) Deprecated.void
setGammaTable
(LXOutput.GammaTable gammaLut) Assigns a custom gamma table to the outputvoid
setGroup
(LXOutputGroup output) Methods inherited from class heronarts.lx.LXComponent
addArray, addChild, addInternalParameter, addLegacyInternalParameter, addLegacyParameter, addParameter, addParameter, addParameters, contains, copyParameters, dispose, getCategory, getChild, getComponentName, getComponentName, getComponentName, getDescription, getId, getLabel, getLX, getOscAddress, getOscLabel, getOscPath, getParameter, getParameters, getParent, getPath, handleOscMessage, hasParameter, isValidOscParameter, loadParameters, loadPreset, removeParameter, removeParameter, removeParameter, removeParameter, save, savePreset, setDescription, setParent, toOscQuery, toOscQuery, toOscQuery, toString, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface heronarts.lx.LXPath
getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, isDescendant
-
Field Details
-
MAX_FRAMES_PER_SECOND
public static final float MAX_FRAMES_PER_SECOND- See Also:
-
enabled
Whether the output is enabled. -
framesPerSecond
Framerate throttle -
gamma
Gamma correction level -
gammaMode
Gamma table mode, whether to inherit gamma -
brightness
Brightness of the output -
whitePointRed
White point scaling for red pixels -
whitePointGreen
White point scaling for green pixels -
whitePointBlue
White point scaling for blue pixels -
whitePointWhite
White point scaling for white pixels (if present)
-
-
Constructor Details
-
LXOutput
-
LXOutput
-
-
Method Details
-
setGammaTable
Deprecated.Assigns a custom gamma table to the output- Parameters:
gammaLut
- Two-dimensional array lookup of gamma curve for each precomputed brightness [0-255][0-255]
-
setGammaTable
Assigns a custom gamma table to the output- Parameters:
gammaLut
- Gamma lookup tables
-
setGammaDelegate
-
setGroup
-
onParameterChanged
Description copied from class:LXComponent
Subclasses are free to override this if desired. It will automatically fire for any listenable parameter that is registered with this component.- Specified by:
onParameterChanged
in interfaceLXParameterListener
- Overrides:
onParameterChanged
in classLXComponent
- Parameters:
p
- Parameter that has a value change
-
send
Sends data to this output, applying throttle and color correction- Parameters:
colors
- Array of color values- Returns:
- this
-
send
Sends data to this output at the pre-corrected brightness- Parameters:
colors
- Color bufferbrightness
- Brightness level from parent- Returns:
- this
-
onSend
Subclasses implement this to send the data.- Parameters:
colors
- Color valuesglut
- Look-up table for 0-255 brightness curvesbrightness
- Master brightness value
-
load
Description copied from class:LXComponent
Loads the LX component. Restores the ID of the component, as well as its internal and user-facing parameters. Any explicitly registered children will be automatically loaded, so long as they are direct descendants. Dynamic arrays will not be automatically loaded, this is left to subclasses to implement.- Specified by:
load
in interfaceLXSerializable
- Overrides:
load
in classLXComponent
- Parameters:
lx
- LX instanceobj
- Object to deserialize
-
log
-
error
-
error
-