Class LXClipEngine

java.lang.Object
heronarts.lx.LXComponent
heronarts.lx.clip.LXClipEngine
All Implemented Interfaces:
LXPath, LXSerializable, LXOscComponent, LXParameterListener

public class LXClipEngine extends LXComponent implements LXOscComponent
  • Field Details

  • Constructor Details

    • LXClipEngine

      public LXClipEngine(LX lx)
  • Method Details

    • 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
    • getGridOffsetParameter

      public DiscreteParameter getGridOffsetParameter()
    • getGridSizeParameter

      public DiscreteParameter getGridSizeParameter()
    • getGridOffset

      public int getGridOffset()
    • getGridSize

      public int getGridSize()
    • updatePatternGridSize

      public void updatePatternGridSize()
    • addControlSurface

      public LXComponent addControlSurface(MixerSurface surface)
    • removeControlSurface

      public LXComponent removeControlSurface(MixerSurface surface)
    • getControlSurfaces

      public Set<MixerSurface> getControlSurfaces()
    • getFocusedClip

      public LXClip getFocusedClip()
    • setFocusedClip

      public LXClipEngine setFocusedClip(LXClip clip)
    • getScene

      public QuantizedTriggerParameter getScene(int index)
      Get the boolean parameter that launches a scene
      Parameters:
      index - Index of scene
      Returns:
      Scene at index
    • getPatternScene

      public QuantizedTriggerParameter getPatternScene(int index)
      Get the boolean parameter that launches a pattern scene
      Parameters:
      index - Index of pattern scene
      Returns:
      Pattern scene at index
    • launchScene

      public LXClipEngine launchScene(int index)
      Launches the scene at given index, subject to launch quantization
      Parameters:
      index - Scene index
      Returns:
      this
    • triggerScene

      public LXClipEngine triggerScene(int index)
      Triggers the scene at given index immediately
      Parameters:
      index - Scene index
      Returns:
      this
    • launchPatternScene

      public LXClipEngine launchPatternScene(int index)
      Launches the pattern scene at given index, subject to launch quantization
      Parameters:
      index - Pattern scene index
      Returns:
      this
    • triggerPatternScene

      public LXClipEngine triggerPatternScene(int index)
      Triggers all patterns at the given index
      Parameters:
      index - Pattern index
      Returns:
      this
    • triggerPatternCycle

      public LXClipEngine triggerPatternCycle()
      Cycle the patterns on every eligible channel
      Returns:
      this
    • stopClips

      public LXClipEngine stopClips()
      Stops all running clips
      Returns:
      this
    • 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
    • dispose

      public void dispose()
      Description copied from class: LXComponent
      Invoked when a component is being removed from the system and will no longer be used at all. This unregisters the component and should free up any resources and parameter listeners. Ideally after this method is called the object should be eligible for garbage collection. Subclasses are generally expected to override this method to handle their particular cleanup work. They should also generally call super.dispose() at the appropriate time to perform the basic cleanup, which may need to happen either before or after cleaning up other objects.
      Overrides:
      dispose in class LXComponent