public class FIRFilterMethod extends FilterMethod
Bit of a bodge to make it fit into the framework originally developed for IIR filters.
Since it uses the same parameter set as the IIR filters, the filter order for FIR filters will be 2^N-1.
Modifier and Type | Field and Description |
---|---|
static int |
NRESPONSEPOINTS |
Constructor and Description |
---|
FIRFilterMethod(double sampleRate,
FilterParams filterParams) |
Modifier and Type | Method and Description |
---|---|
Filter |
createFilter(int channel) |
double |
getFilterGain(double omega)
Get the filter gain at an angular frequency (o < omega < pi).
|
double |
getFilterGainConstant() |
double |
getFilterPhase(double omega)
Get the filter phase at an angular frequency (o < omega < pi).
|
double[] |
getFilterTaps() |
createFilterMethod, getFastFilterCoefficients, getFilterParams, getSampleRate, setFilterParams, setSampleRate
public static final int NRESPONSEPOINTS
public FIRFilterMethod(double sampleRate, FilterParams filterParams)
public double getFilterGain(double omega)
FilterMethod
getFilterGain
in class FilterMethod
omega
- angular frequencypublic double getFilterGainConstant()
getFilterGainConstant
in class FilterMethod
public double getFilterPhase(double omega)
FilterMethod
getFilterPhase
in class FilterMethod
omega
- angular frequencypublic Filter createFilter(int channel)
createFilter
in class FilterMethod
channel
- channel number (used in filter book keeping)public double[] getFilterTaps()