com.softsynth.jsyn
Class Filter_2o2p

java.lang.Object
  extended by java.util.Observable
      extended by com.softsynth.jsyn.SynthObject
          extended by com.softsynth.jsyn.SynthSound
              extended by com.softsynth.jsyn.SynthUnit
                  extended by com.softsynth.jsyn.SynthFilter
                      extended by com.softsynth.jsyn.Filter_2o2p

public class Filter_2o2p
extends SynthFilter

Filter_2o2p unit. Second Order, Two Pole filter using the following formula:

y(n) = A0*x(n) - B1*y(n-1) - B2*y(n-2)

where y(n) is Output, x(n) is Input, and y(n-1) is a delayed copy of the output.

This filter is a recursive IIR or Infinite Impulse Response filter. it can be unstable depending on the values of the coefficients.

A thorough description of the digital filter theory needed to fully describe this filter is beyond the scope of this document. Calculating coefficients is non-intuitive; the interested user is referred to one of the standard texts on filter theory (e.g., Moore, "Elements of Computer Music", section 2.4).

Version:
JSyn Version 006
Author:
(C) 1997 Phil Burk, SoftSynth.com, All Rights Reserved
See Also:
Synth, SynthUnit, Filter_1o1z, Filter_1o1p, Filter_2o2p2z, Filter_1o1p1z, Filter_StateVariable

Field Summary
 SynthVariable A0
          Filter coefficient.
 SynthVariable B1
          Filter coefficient.
 SynthVariable B2
          Filter coefficient.
 
Fields inherited from class com.softsynth.jsyn.SynthFilter
input, output
 
Constructor Summary
Filter_2o2p()
           
Filter_2o2p(SynthContext synthContext)
          Create a SynthUnit that runs at Synth.RATE_AUDIO.
Filter_2o2p(SynthContext synthContext, int calculationRate)
           
 
Method Summary
 
Methods inherited from class com.softsynth.jsyn.SynthSound
addPort, addPort, findNamedPort, getName, getNumPorts, getPortAt, getPriority, setPriority, setStage, setStage, start, start, stop, stop
 
Methods inherited from class com.softsynth.jsyn.SynthObject
delete, deleteAll, enableDeletionByGarbageCollector, enableTracking, getPeer, getSynthContext, isTrackingEnabled, toString, track
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

A0

public SynthVariable A0
Filter coefficient. SIGNAL_TYPE_RAW_SIGNED, default = 0.0.


B1

public SynthVariable B1
Filter coefficient. SIGNAL_TYPE_RAW_SIGNED, default = 0.0.


B2

public SynthVariable B2
Filter coefficient. SIGNAL_TYPE_RAW_SIGNED, default = 0.0.

Constructor Detail

Filter_2o2p

public Filter_2o2p(SynthContext synthContext,
                   int calculationRate)
            throws SynthException
Throws:
SynthException

Filter_2o2p

public Filter_2o2p(SynthContext synthContext)
            throws SynthException
Create a SynthUnit that runs at Synth.RATE_AUDIO.

Throws:
SynthException - If resource allocation fails.

Filter_2o2p

public Filter_2o2p()
            throws SynthException
Throws:
SynthException