Class LXOutput

java.lang.Object
heronarts.lx.LXComponent
heronarts.lx.output.LXOutput
All Implemented Interfaces:
LXPath, LXSerializable, LXParameterListener
Direct Known Subclasses:
LXBufferOutput, LXOutputGroup, LXStructureOutput

public abstract class LXOutput extends LXComponent
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.
  • Field Details

    • MAX_FRAMES_PER_SECOND

      public static final float MAX_FRAMES_PER_SECOND
      See Also:
    • enabled

      public final BooleanParameter enabled
      Whether the output is enabled.
    • framesPerSecond

      public final BoundedParameter framesPerSecond
      Framerate throttle
    • gamma

      public final BoundedParameter gamma
      Gamma correction level
    • gammaMode

      public final EnumParameter<LXOutput.GammaMode> gammaMode
      Gamma table mode, whether to inherit gamma
    • brightness

      public final CompoundParameter brightness
      Brightness of the output
    • whitePointRed

      public final DiscreteParameter whitePointRed
      White point scaling for red pixels
    • whitePointGreen

      public final DiscreteParameter whitePointGreen
      White point scaling for green pixels
    • whitePointBlue

      public final DiscreteParameter whitePointBlue
      White point scaling for blue pixels
    • whitePointWhite

      public final DiscreteParameter whitePointWhite
      White point scaling for white pixels (if present)
  • Constructor Details

    • LXOutput

      protected LXOutput(LX lx)
    • LXOutput

      protected LXOutput(LX lx, String label)
  • Method Details

    • setGammaTable

      @Deprecated public void setGammaTable(byte[][] gammaLut)
      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

      public void setGammaTable(LXOutput.GammaTable gammaLut)
      Assigns a custom gamma table to the output
      Parameters:
      gammaLut - Gamma lookup tables
    • setGammaDelegate

      public void setGammaDelegate(LXOutput gammaDelegate)
    • setGroup

      public void setGroup(LXOutputGroup output)
    • onParameterChanged

      public void onParameterChanged(LXParameter p)
      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 interface LXParameterListener
      Overrides:
      onParameterChanged in class LXComponent
      Parameters:
      p - Parameter that has a value change
    • send

      public LXOutput send(int[] colors)
      Sends data to this output, applying throttle and color correction
      Parameters:
      colors - Array of color values
      Returns:
      this
    • send

      public final LXOutput send(int[] colors, double brightness)
      Sends data to this output at the pre-corrected brightness
      Parameters:
      colors - Color buffer
      brightness - Brightness level from parent
      Returns:
      this
    • onSend

      protected abstract void onSend(int[] colors, LXOutput.GammaTable glut, double brightness)
      Subclasses implement this to send the data.
      Parameters:
      colors - Color values
      glut - Look-up table for 0-255 brightness curves
      brightness - Master brightness value
    • load

      public void load(LX lx, JsonObject obj)
      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 interface LXSerializable
      Overrides:
      load in class LXComponent
      Parameters:
      lx - LX instance
      obj - Object to deserialize
    • log

      public static final void log(String message)
    • error

      public static final void error(String message)
    • error

      public static final void error(Exception x, String message)