Package fftFilter

Class FFTFilter

java.lang.Object
fftFilter.FFTFilter
All Implemented Interfaces:
Filter

public class FFTFilter extends Object implements Filter
  • Constructor Details

    • FFTFilter

      public FFTFilter(FFTFilterParams fftFilterParams, float sampleRate)
  • Method Details

    • setParams

      public void setParams(FFTFilterParams fftFilterParams, float sampleRate)
      Set parameters for the filter.
      Parameters:
      fftFilterParams - the filter parameters.
      sampleRate - - the sample rate.
    • getFilterDelay

      public int getFilterDelay()
      Description copied from interface: Filter
      Gets the delay of the filter - rarely used, but can be important for some processing tasks. For an IIRF filter, this would be half the number of poles, for a moving average or median filter it would be half the filter length.
      Specified by:
      getFilterDelay in interface Filter
      Returns:
      filter delay in samples.
    • prepareFilter

      public void prepareFilter()
      Description copied from interface: Filter
      Calculates the poles and zeros for the filter and sets up any memory buffers required during real time operation.
      Specified by:
      prepareFilter in interface Filter
    • runFilter

      public void runFilter(double[] inputData, double[] outputData)
      Description copied from interface: Filter
      Runs the filter on an array of data

      New values write into the output data array.

      Specified by:
      runFilter in interface Filter
      Parameters:
      inputData -
    • runFilterFullforward

      public void runFilterFullforward(double[] inputData, double[] outputData)
      Old version
      Parameters:
      inputData -
      outputData -
    • runFilter

      public void runFilter(Complex[] complexData, int fftLength)
      Filter complex FFT data. Note that the data may be full or just half of the FTF length.
      Parameters:
      complexData - Complex Array will be FFTLength of FFTLength / 2 long.
      fftLength - FFT Length
    • runFilter

      public void runFilter(ComplexArray complexData, int fftLength)
    • runFilter

      public void runFilter(double[] inputData)
      Description copied from interface: Filter
      Runs the filter on an array of data

      New values overwrite the old values in the array.

      Specified by:
      runFilter in interface Filter
      Parameters:
      inputData -
    • runFilter

      public double runFilter(double aData)
      Description copied from interface: Filter
      Runs the filter on a single data value
      Specified by:
      runFilter in interface Filter
      Parameters:
      aData -
      Returns:
      New data value
    • isRemoveMean

      public boolean isRemoveMean()
      Returns:
      the removeMean
    • setRemoveMean

      public void setRemoveMean(boolean removeMean)
      Parameters:
      removeMean - the removeMean to set