Class LXMixerEngine

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

public class LXMixerEngine extends LXComponent implements LXOscComponent
Encapsulation of all the LX channel blending and mixer
  • Field Details

  • Constructor Details

    • LXMixerEngine

      public LXMixerEngine(LX lx)
  • Method Details

    • addListener

      public final LXMixerEngine addListener(LXMixerEngine.Listener listener)
    • removeListener

      public final LXMixerEngine removeListener(LXMixerEngine.Listener listener)
    • 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
    • handleOscMessage

      public boolean handleOscMessage(OscMessage message, String[] parts, int index)
      Description copied from class: LXComponent
      Handles an OSC message sent to this component. By default this method handles registered components and parameters, but subclasses may override this method to handle different types of OSC messages.
      Specified by:
      handleOscMessage in interface LXOscComponent
      Overrides:
      handleOscMessage in class LXComponent
      Parameters:
      message - Full OSC message object
      parts - The OSC address pattern, broken into an array of parts
      index - Which index into the parts array corresponds to this component's children
      Returns:
      true if the OSC message was handled and should be considered consumed, false otherwise
    • instantiateChannelBlends

      public LXBlend[] instantiateChannelBlends()
    • instantiateTransitionBlends

      protected LXBlend[] instantiateTransitionBlends()
    • instantiateCrossfaderBlends

      protected LXBlend[] instantiateCrossfaderBlends()
    • getChannels

      public List<LXAbstractChannel> getChannels()
    • getDefaultChannel

      public LXChannel getDefaultChannel()
    • getLastChannel

      public LXAbstractChannel getLastChannel()
    • getChannel

      public LXAbstractChannel getChannel(int channelIndex)
    • getChannel

      public LXAbstractChannel getChannel(String label)
    • getFocusedChannel

      public LXBus getFocusedChannel()
    • setFocusedChannel

      public LXMixerEngine setFocusedChannel(LXBus channel)
    • getFocusedChannelAux

      public LXBus getFocusedChannelAux()
    • setFocusedChannelAux

      public LXMixerEngine setFocusedChannelAux(LXBus channel)
    • deselectChannel

      public LXMixerEngine deselectChannel(LXBus bus)
    • selectChannel

      public LXMixerEngine selectChannel(LXBus bus)
    • selectChannel

      public LXMixerEngine selectChannel(LXBus bus, boolean multipleSelection)
    • selectChannelRange

      public LXMixerEngine selectChannelRange(LXBus destination)
    • addChannel

      public LXChannel addChannel()
    • addChannel

      public LXChannel addChannel(int index, JsonObject channelObj)
    • addChannel

      public LXChannel addChannel(JsonObject channelObj)
    • addChannel

      public LXChannel addChannel(int index)
    • addChannel

      public LXChannel addChannel(LXPattern[] patterns)
    • addChannel

      public LXChannel addChannel(int index, LXPattern[] patterns)
    • addChannel

      public LXChannel addChannel(int index, JsonObject channelObj, LXPattern[] patterns)
    • group

      public LXMixerEngine group(LXGroup group, LXChannel channel, int index)
    • ungroup

      public LXMixerEngine ungroup(LXChannel channel)
    • addGroupFromSelection

      public LXGroup addGroupFromSelection()
    • addGroup

      public LXGroup addGroup()
    • addGroup

      public LXGroup addGroup(int index)
    • addGroup

      public LXGroup addGroup(List<LXChannel> groupChannels)
    • getSelectedChannelsForGroup

      public List<LXChannel> getSelectedChannelsForGroup()
    • removeSelectedChannels

      public void removeSelectedChannels()
    • removeChannel

      public void removeChannel(LXAbstractChannel channel)
    • moveChannel

      public void moveChannel(LXAbstractChannel channel, int delta)
      Move a channel by a relative increment. Handles group overlap moves automatically.
      Parameters:
      channel - Channel to move
      delta - Relative amount to move by
    • moveChannel

      public void moveChannel(LXAbstractChannel bus, int index, LXGroup group)
      Move a channel to a specified index, possibly adding or removing to a group
      Parameters:
      bus - Channel to move
      index - Index position to move to
      group - Group the channel should belong to, or null
    • enableChannelCue

      public LXMixerEngine enableChannelCue(LXAbstractChannel channel, boolean isExclusive)
    • enableChannelAux

      public LXMixerEngine enableChannelAux(LXAbstractChannel channel, boolean isExclusive)
    • loop

      public void loop(LXEngine.Frame render, double deltaMs)
    • save

      public void save(LX lx, JsonObject obj)
      Description copied from class: LXComponent
      Serializes the LX component. By default, all internal and user-facing parameters are serialized, as well as any explicitly registered child components. Note that child arrays are not serialized, or any other dynamic components. Subclasses may override to perform more saving, and are expected to call super.save(lx, obj) at the appropriate time.
      Specified by:
      save in interface LXSerializable
      Overrides:
      save in class LXComponent
      Parameters:
      lx - LX instance
      obj - Object to serialize into
    • 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
    • clear

      public void clear()
    • loadChannel

      public void loadChannel(JsonObject channelObj)
    • loadChannel

      public void loadChannel(JsonObject channelObj, int index)