com.jsyn.unitgen
Class FilterBiquadShelf

java.lang.Object
  extended by com.jsyn.unitgen.UnitGenerator
      extended by com.jsyn.unitgen.UnitFilter
          extended by com.jsyn.unitgen.TunableFilter
              extended by com.jsyn.unitgen.FilterBiquad
                  extended by com.jsyn.unitgen.FilterBiquadShelf
All Implemented Interfaces:
UnitSink, UnitSource
Direct Known Subclasses:
FilterHighShelf, FilterLowShelf

public abstract class FilterBiquadShelf
extends FilterBiquad

This filter is based on the BiQuad filter and is used as a base class for FilterLowShelf and FilterHighShelf. Coefficients are updated whenever the frequency, gain or slope changes.


Field Summary
 UnitInputPort gain
          Gain of peak.
 UnitInputPort slope
          Shelf Slope parameter.
 
Fields inherited from class com.jsyn.unitgen.FilterBiquad
amplitude
 
Fields inherited from class com.jsyn.unitgen.TunableFilter
frequency
 
Fields inherited from class com.jsyn.unitgen.UnitFilter
input, output
 
Fields inherited from class com.jsyn.unitgen.UnitGenerator
FALSE, TRUE
 
Constructor Summary
FilterBiquadShelf()
           
 
Method Summary
 void recalculate()
          Compute coefficients for shelf filter if frequency, gain or slope have changed.
abstract  void updateCoefficients()
          Abstract method.
 
Methods inherited from class com.jsyn.unitgen.FilterBiquad
generate, performBiquadFilter
 
Methods inherited from class com.jsyn.unitgen.UnitFilter
getInput, getOutput
 
Methods inherited from class com.jsyn.unitgen.UnitGenerator
addPort, convertHalfLifeToMultiplier, flattenOutputs, generate, getFramePeriod, getFrameRate, getPortByName, getPorts, getSynthesisEngine, isEnabled, pullData, setCircuit, setFrameRate, setSynthesisEngine, start, stop
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gain

public UnitInputPort gain
Gain of peak. Use 1.0 for flat response.


slope

public UnitInputPort slope
Shelf Slope parameter. When S = 1, the shelf slope is as steep as you can get it and remain monotonically increasing or decreasing gain with frequency.

Constructor Detail

FilterBiquadShelf

public FilterBiquadShelf()
Method Detail

updateCoefficients

public abstract void updateCoefficients()
Abstract method. Each filter must implement its update of coefficients.


recalculate

public void recalculate()
Compute coefficients for shelf filter if frequency, gain or slope have changed.