Class SoundObject

All Implemented Interfaces:
LXComponent.Renamable, LXLoopTask, LXPath, LXSerializable, LXOscComponent, LXNormalizedParameter, LXParameter, LXParameterListener, Comparable<SoundObject>

@LXCategory("Audio") @Global("Sound Object") public class SoundObject extends LXModulator implements Comparable<SoundObject>, LXOscComponent, LXNormalizedParameter
  • Field Details

  • Constructor Details

    • SoundObject

      public SoundObject(LX lx)
  • Method Details

    • get

      public static SoundObject get(LX lx)
    • 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 LXRunnableComponent
      Parameters:
      p - Parameter that has a value change
    • updateCartesian

      public void updateCartesian()
    • computeValue

      protected double computeValue(double deltaMs)
      Description copied from class: LXModulator
      Implementation method to advance the modulator's internal state. Subclasses must provide and update value appropriately.
      Specified by:
      computeValue in class LXModulator
      Parameters:
      deltaMs - Number of milliseconds to advance by
      Returns:
      Computed value
    • setNormalized

      public LXNormalizedParameter setNormalized(double value)
      Description copied from interface: LXNormalizedParameter
      Sets the value or the parameter in normalized space from 0 to 1
      Specified by:
      setNormalized in interface LXNormalizedParameter
      Parameters:
      value - The normalized value, from 0 to 1
      Returns:
      this, for method chaining
    • getNormalized

      public double getNormalized()
      Description copied from interface: LXNormalizedParameter
      Gets the value of the parameter in a normalized space from 0 to 1
      Specified by:
      getNormalized in interface LXNormalizedParameter
      Returns:
      Value of parameter, normalized to range from 0 to 1
    • compareTo

      public int compareTo(SoundObject that)
      Specified by:
      compareTo in interface Comparable<SoundObject>
    • 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.
      Specified by:
      dispose in interface LXParameter
      Overrides:
      dispose in class LXComponent