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
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic classstatic interfaceNested classes/interfaces inherited from class heronarts.lx.LXComponent
LXComponent.Description, LXComponent.Hidden, LXComponent.Name, LXComponent.Placeholder, LXComponent.PluginRequired, LXComponent.RenamableNested classes/interfaces inherited from interface heronarts.lx.LXSerializable
LXSerializable.Utils -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal CompoundParameterBrightness of the outputfinal BooleanParameterWhether the output is enabled.final BoundedParameterFramerate throttlefinal BoundedParameterGamma correction levelfinal EnumParameter<LXOutput.GammaMode> Gamma table mode, whether to inherit gammastatic final floatfinal DiscreteParameterWhite point scaling for blue pixelsfinal DiscreteParameterWhite point scaling for green pixelsfinal DiscreteParameterWhite point scaling for red pixelsfinal DiscreteParameterWhite point scaling for white pixels (if present)Fields inherited from class heronarts.lx.LXComponent
childArrays, 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, presetFileFields inherited from interface heronarts.lx.LXPath
DEFAULT_SEPARATOR, ROOT, ROOT_PREFIX, ROOT_SLASH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final voidstatic final voidvoidload(LX lx, JsonObject obj) Loads the LX component.static final voidvoidSubclasses are free to override this if desired.protected abstract voidonSend(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 LXOutputsend(int[] colors, double brightness) Sends data to this output at the pre-corrected brightnessvoidsetGammaDelegate(LXOutput gammaDelegate) voidsetGammaTable(byte[][] gammaLut) Deprecated.voidsetGammaTable(LXOutput.GammaTable gammaLut) Assigns a custom gamma table to the outputvoidsetGroup(LXOutputGroup output) Methods inherited from class heronarts.lx.LXComponent
addArray, addChild, addInternalParameter, addLegacyInternalParameter, addLegacyParameter, addParameter, addParameter, addParameters, assertDisposed, contains, copyParameters, dispose, getCategory, getChild, getComponentDescription, 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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface heronarts.lx.LXPath
getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, 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:LXComponentSubclasses are free to override this if desired. It will automatically fire for any listenable parameter that is registered with this component.- Specified by:
onParameterChangedin interfaceLXParameterListener- Overrides:
onParameterChangedin 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:LXComponentLoads 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:
loadin interfaceLXSerializable- Overrides:
loadin classLXComponent- Parameters:
lx- LX instanceobj- Object to deserialize
-
log
-
error
-
error
-