Class VariableLFO

All Implemented Interfaces:
LXComponent.Renamable, LXLoopTask, LXPath, LXSerializable, LXWaveshape, LXOscComponent, LXNormalizedParameter, LXParameter, LXParameterListener

@LXCategory("Core") @Global("LFO") @Device("LFO") public class VariableLFO extends LXVariablePeriodModulator implements LXWaveshape, LXOscComponent
A sawtooth LFO oscillates from one extreme value to another. When the later value is hit, the oscillator rests to its initial value.
  • Field Details

  • Constructor Details

    • VariableLFO

      public VariableLFO()
    • VariableLFO

      public VariableLFO(String label)
    • VariableLFO

      public VariableLFO(String label, LXWaveshape[] waveshapes)
    • VariableLFO

      public VariableLFO(String label, LXWaveshape[] waveshapes, CompoundParameter period)
      Constructs a VariableLFO with a custom list of waveshapes
      Parameters:
      label - LFO label
      waveshapes - Optional list of custom LXWaveshape. If null, will use predefined ones in LXWaveshape
      period - Optional. Parameter that supplies custom waveform period, in ms. Default goes 100-60000ms.
  • Method Details

    • getWaveshape

      public LXWaveshape getWaveshape()
    • computeNormalizedValue

      protected final double computeNormalizedValue(double deltaMs, double basis)
      Description copied from class: LXRangeModulator
      Subclasses implement this which returns their value from a 0-1 scale. This class automatically takes care of scaling to the startValue/endValue range.
      Specified by:
      computeNormalizedValue in class LXRangeModulator
      Parameters:
      deltaMs - Milliseconds elapsed
      basis - Basis of modulator
      Returns:
      Modulator value
    • computeNormalizedBasis

      protected final double computeNormalizedBasis(double basis, double normalizedValue)
      Description copied from class: LXRangeModulator
      Subclasses determine the basis based on a normalized value from 0 to 1.
      Specified by:
      computeNormalizedBasis in class LXRangeModulator
      Parameters:
      basis - Modulator basis
      normalizedValue - A normalize value from 0 to 1
      Returns:
      Computed normalized basis for modulator
    • compute

      public double compute(double basis)
      Specified by:
      compute in interface LXWaveshape
    • computeBase

      public double computeBase(double basis)
    • invert

      public double invert(double value, double basisHint)
      Specified by:
      invert in interface LXWaveshape