com.jsyn.unitgen
Class FilterBiquadCommon

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.FilterBiquadCommon
All Implemented Interfaces:
UnitSink, UnitSource
Direct Known Subclasses:
FilterBandPass, FilterBandStop, FilterHighPass, FilterLowPass, FilterPeakingEQ

public abstract class FilterBiquadCommon
extends FilterBiquad

Extend this class to create a filter that implements Biquad filter with a Q port.


Field Summary
 UnitInputPort Q
           
 
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
FilterBiquadCommon()
          No-argument constructor instantiates the Biquad common and adds an amplitude port to this filter.
 
Method Summary
 void computeBiquadCommon(double ratio, double Q)
           
 void recalculate()
          The recalculate() method checks and ensures that the frequency and Q values are at a minimum.
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

Q

public UnitInputPort Q
Constructor Detail

FilterBiquadCommon

public FilterBiquadCommon()
No-argument constructor instantiates the Biquad common and adds an amplitude port to this filter.

Method Detail

updateCoefficients

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


computeBiquadCommon

public void computeBiquadCommon(double ratio,
                                double Q)

recalculate

public void recalculate()
The recalculate() method checks and ensures that the frequency and Q values are at a minimum. It also only updates the Biquad coefficients if either frequency or Q have changed.