|
|||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||
See:
Description
| Class Summary | |
|---|---|
| FilterAlgorithm | Specifies the algorithm/function used to design a filter, such as Butterworth, Bessel, or Chebyshev. |
| FilterDesigner | Creates IIRFilters designed according to the algorithm
and type provided in FilterSpecification objects. |
| FilterRange | Specifies the range type used to design a filter, such as Bandpass, Lowpass, Highpass or Bandstop. |
| FilterSpecification | Contains the filter specification information required for
the FilterDesigner to create an IIRFilter. |
| IIRFilter | Processes digital signal input to filter for specific frequencies. |
| Exception Summary | |
|---|---|
| FilterDesignException | Runtime exception thrown when the FilterDesigner is unable to create a new
IIRFilter, usually due to inconsistent settings in the
FilterSpecification. |
Provides classes for designing Infinite Impulse Response (IIR) filters.
To create a new IIRFilter, first create a FilterSpecification
object which defines the filter specification. Then pass the FilterSpecification
to the FilterDesigner's createFilter method.
public class SampleFilter implements IPlayerSampleListener
{
private IIRFilter filter;
public SampleFilter()
{
FilterSpecification spec = new FilterSpecification();
spec.setDescription("Alpha band");
spec.setAlgorithmType(FilterAlgorithm.BUTTERWORTH);
spec.setRangeType(FilterRange.BANDPASS);
spec.setOrder(5);
spec.setRate(256);
spec.setFrequency0(8);
spec.setFrequency1(12);
spec.setAutoAdjust(true);
FilterDesigner designer = new FilterDesigner()
filter = designer.createFilter(spec);
}
public void receiveSample(double rawSample)
{
double alphaValue = filter.process(rawSample);
notifyListeners(alphaValue);
}
...
}
|
|||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||