Class SoundStage

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

public class SoundStage extends LXComponent implements LXOscComponent
  • Field Details

  • Constructor Details

    • SoundStage

      public SoundStage(LX lx)
  • Method Details

    • getNormalizedObjectPosition

      public LXVector getNormalizedObjectPosition(SoundObject object)
      Gets the normalized sound object position in the global model space
      Parameters:
      object - Sound object
      Returns:
      Vector of normalized x/y/z values for sound object position
    • getNormalizedObjectPosition

      public LXVector getNormalizedObjectPosition(SoundObject object, LXModel reference)
      Gets the normalized sound object position in the global model space
      Parameters:
      object - Sound object
      reference - Model to perform normalization against
      Returns:
      Vector of normalized x/y/z values for sound object position
    • getNormalizedObjectPosition

      public LXVector getNormalizedObjectPosition(SoundObject object, SoundStage.ObjectPositionMode mode, LXModel reference)
      For the given sound object, determine its position using the given mode of placement in the sound stage, and then re-normalized it against the bounds of the reference model. Note that this version of the method allocates memory.
      Parameters:
      object - Sound object
      mode - Sound stage positioning mode
      reference - Reference model
      Returns:
      The position vector
    • getNormalizedObjectPosition

      public LXVector getNormalizedObjectPosition(SoundObject object, SoundStage.ObjectPositionMode mode, LXModel model, LXVector position)
      For the given sound object, determine its position using the given mode of placement in the sound stage, and then re-normalized it against the bounds of the reference model
      Parameters:
      object - Sound object
      mode - Sound stage positioning mode
      model - Model being rendered to
      position - Position vector to fill
      Returns:
      The position vector
    • 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