Class ScriptPattern

All Implemented Interfaces:
LXComponent.Renamable, LXDeviceComponent.Midi, LXLoopTask, LXPath, LXPresetComponent, LXSerializable, LXMidiListener, LXModulationContainer, LXOscComponent, LXParameterListener

public class ScriptPattern extends LXPattern implements LXDeviceComponent.Midi
  • Field Details

  • Constructor Details

    • ScriptPattern

      public ScriptPattern(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
    • onModelChanged

      public void onModelChanged(LXModel model)
      Description copied from class: LXModelComponent
      Subclasses should override to handle changes to which model they are addressing. This method will be invoked at the start of the next core loop invocation, after the buffer has been updated.
      Overrides:
      onModelChanged in class LXModelComponent
      Parameters:
      model - New model
    • isHiddenControl

      public boolean isHiddenControl(LXParameter parameter)
      Description copied from class: LXDeviceComponent
      Returns whether this parameter is visible in default remote control or device control UIs
      Overrides:
      isHiddenControl in class LXPattern
      Parameters:
      parameter - Parameter to check
      Returns:
      true if this should be hidden by default
    • run

      public void run(double deltaMs)
      Description copied from class: LXPattern
      Main pattern loop function. Invoked in a render loop. Subclasses must implement this function.
      Specified by:
      run in class LXPattern
      Parameters:
      deltaMs - Number of milliseconds elapsed since last invocation
    • 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 LXPattern
      Parameters:
      lx - LX instance
      obj - Object to deserialize
    • noteOnReceived

      public void noteOnReceived(MidiNoteOn note)
      Specified by:
      noteOnReceived in interface LXMidiListener
    • noteOffReceived

      public void noteOffReceived(MidiNote note)
      Specified by:
      noteOffReceived in interface LXMidiListener
    • controlChangeReceived

      public void controlChangeReceived(MidiControlChange cc)
      Specified by:
      controlChangeReceived in interface LXMidiListener
    • programChangeReceived

      public void programChangeReceived(MidiProgramChange pc)
      Specified by:
      programChangeReceived in interface LXMidiListener
    • pitchBendReceived

      public void pitchBendReceived(MidiPitchBend pitchBend)
      Specified by:
      pitchBendReceived in interface LXMidiListener
    • aftertouchReceived

      public void aftertouchReceived(MidiAftertouch aftertouch)
      Specified by:
      aftertouchReceived in interface LXMidiListener