Class BandFilter

All Implemented Interfaces:
GraphicMeter.Processor, LXComponent.Renamable, LXLoopTask, LXPath, LXSerializable, LXOscComponent, LXNormalizedParameter, LXParameter, LXParameterListener
Direct Known Subclasses:
BandGate

@LXCategory("Audio") @Global("Band Filter") @Device("Band Filter") public class BandFilter extends LXModulator implements LXNormalizedParameter, LXOscComponent, GraphicMeter.Processor
  • Field Details

    • gain

      public final BoundedParameter gain
      Gain of the meter, in decibels
    • range

      public final BoundedParameter range
      Range of the meter, in decibels.
    • attack

      public final BoundedParameter attack
      Meter attack time, in milliseconds
    • release

      public final BoundedParameter release
      Meter release time, in milliseconds
    • slope

      public final BoundedParameter slope
      dB/octave slope applied to the equalizer
    • minFreq

      public final BoundedParameter minFreq
      Minimum frequency for the band
    • maxFreq

      public final BoundedParameter maxFreq
      Maximum frequency for the band
    • meter

      public final GraphicMeter meter
    • averageNorm

      protected double averageNorm
  • Constructor Details

    • BandFilter

      public BandFilter(LX lx)
    • BandFilter

      public BandFilter(String label, LX lx)
    • BandFilter

      public BandFilter(String label, GraphicMeter meter)
      Constructs a gate that monitors a specified frequency band
      Parameters:
      label - Label
      meter - GraphicEQ object to drive this gate
  • 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 LXRunnableComponent
      Parameters:
      p - Parameter that has a value change
    • setFrequencyRange

      public BandFilter setFrequencyRange(float minHz, float maxHz)
      Sets range of frequencies to look at
      Parameters:
      minHz - Minimum frequency
      maxHz - Maximum frequency
      Returns:
      this
    • getBand

      public double getBand(int i)
    • onMeterAudioFrame

      public void onMeterAudioFrame(GraphicMeter meter)
      Specified by:
      onMeterAudioFrame in interface GraphicMeter.Processor
    • onMeterStop

      public void onMeterStop(GraphicMeter meter)
      Specified by:
      onMeterStop in interface GraphicMeter.Processor
    • 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
    • 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