org.tritonus.lowlevel.dsp
Interface Filter

All Known Implementing Classes:
FIR

public interface Filter

Common interface for all types of filters. This is intended for filters that consume samples the same rate they output them. Examples of such filters are common FIR and IIR filters.


Method Summary
 double getFrequencyResponse(double dOmega)
          Get the frequency response of the filter at a specified frequency.
 double getPhaseResponse(double dOmega)
          Get the phase response of the filter at a specified frequency.
 float process(float fSample)
          Process one sample through the filter.
 

Method Detail

process

float process(float fSample)
Process one sample through the filter. Input and output samples are normally in the range [-1.0 .. +1.0].


getFrequencyResponse

double getFrequencyResponse(double dOmega)
Get the frequency response of the filter at a specified frequency. This method calculates the frequency response of the filter for a specified frequency. Calling this method is allowed at any time, even while the filter is operating. It does not affect the operation of the filter.

Parameters:
dOmega - The frequency for which the frequency response should be calculated. Has to be given as omega values ([-PI .. +PI]).
Returns:
The calculated frequency response.

getPhaseResponse

double getPhaseResponse(double dOmega)
Get the phase response of the filter at a specified frequency. This method calculates the phase response of the filter for a specified frequency. Calling this method is allowed at any time, even while the filter is operating. It does not affect the operation of the filter.

Parameters:
dOmega - The frequency for which the phase response should be calculated. Has to be given as omega values ([-PI .. +PI]).
Returns:
The calculated phase response.