Class LXAbstractChannel

All Implemented Interfaces:
LXComponent.Renamable, LXLoopTask, LXPath, LXPresetComponent, LXSerializable, LXOscComponent, LXParameterListener
Direct Known Subclasses:
LXChannel, LXGroup

public abstract class LXAbstractChannel extends LXBus implements LXComponent.Renamable
Abstract subclass for both groups and channels
  • Field Details

    • index

      protected int index
      The index of this channel in the engine.
    • blendBuffer

      protected final ModelBuffer blendBuffer
      This is a local buffer used for transition blending on this channel
    • colors

      protected int[] colors
    • enabled

      public final BooleanParameter enabled
      Whether this channel is enabled.
    • crossfadeGroup

      public final EnumParameter<LXAbstractChannel.CrossfadeGroup> crossfadeGroup
      Crossfade group this channel belongs to
    • cueActive

      public final BooleanParameter cueActive
      Whether this channel should show in the cue UI.
    • auxActive

      public final BooleanParameter auxActive
      Whether this channel should show in the aux UI.
    • midiFilter

      public final MidiFilterParameter midiFilter
    • blendMode

      public final ObjectParameter<LXBlend> blendMode
    • performanceWarning

      public final BooleanParameter performanceWarning
    • view

      public final LXViewEngine.Selector view
      View selector for this abstract channel
  • Constructor Details

    • LXAbstractChannel

      protected LXAbstractChannel(LX lx, int index, String label)
  • Method Details

    • constructProfiler

      protected LXModulatorComponent.Profiler constructProfiler()
      Overrides:
      constructProfiler in class LXBus
    • addMidiListener

      public LXAbstractChannel addMidiListener(LXAbstractChannel.MidiListener listener)
    • removeMidiListener

      public LXAbstractChannel removeMidiListener(LXAbstractChannel.MidiListener listener)
    • getModelView

      public LXModel getModelView()
    • getPath

      public String getPath()
      Description copied from class: LXComponent
      Accessor for the path of this object. Returns the path this component was registered with. Some subclasses may override this if path structure is dynamic.
      Specified by:
      getPath in interface LXPath
      Overrides:
      getPath in class LXComponent
      Returns:
      path of this component relative to its parent
    • 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
    • midiMessage

      public void midiMessage(LXShortMessage message)
      Invoked by the MIDI/OSC/Clip engines when this channel should process a MIDI message. This will notify the channel's listeners.
      Parameters:
      message - Message to process
    • midiDispatch

      public void midiDispatch(LXShortMessage message)
      Dispatch a MIDI message to all the active devices on this channel, without notifying listeners.
      Parameters:
      message - Message
    • loop

      public void loop(double deltaMs)
      Specified by:
      loop in interface LXLoopTask
      Overrides:
      loop in class LXBus
    • addListener

      public final void addListener(LXAbstractChannel.Listener listener)
    • removeListener

      public final void removeListener(LXAbstractChannel.Listener listener)
    • getIndex

      public final int getIndex()
      Specified by:
      getIndex in class LXBus
    • 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 LXBus
    • postProcessPreset

      public void postProcessPreset(LX lx, JsonObject obj)
      Description copied from interface: LXPresetComponent
      Presets by default contain the results of a normal save() call, but we may not always want all of the information contained. This method post-processes the JSON object before writing to disk.
      Specified by:
      postProcessPreset in interface LXPresetComponent
      Overrides:
      postProcessPreset in class LXBus
    • 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 LXBus
      Parameters:
      lx - LX instance
      obj - Object to deserialize