Class ARF1HPFOnePole

java.lang.Object
com.io7m.aradine.filter.recursive1.ARF1HPFOnePole

public final class ARF1HPFOnePole extends Object
A trivial, recursive, one-pole high pass filter. Filter instances are stateful (they store the most recently processed input and output frame) and therefore each should therefore only be used on a single audio stream.
See Also:
  • "https://www.dspguide.com/ch19.htm"
  • Constructor Details

    • ARF1HPFOnePole

      public ARF1HPFOnePole()
      Create a new filter.
  • Method Details

    • setCutoff

      public void setCutoff(double newCutoff)

      Specify a new frequency cutoff value.

      This a value in the range [0, 1] where 0 effectively blocks nothing, 0.5 blocks roughly half of the lower frequency spectrum, and 1.0 effectively blocks all frequencies.

      Parameters:
      newCutoff - The cutoff
    • processOneFrameBuffers

      public void processOneFrameBuffers(int frame, DoubleBuffer input, DoubleBuffer output)
      Apply a filter to the given frame in the input buffer, writing the filtered frame to the corresponding frame of the output buffer.
      Parameters:
      frame - The frame index
      input - The input buffer
      output - The output buffer
    • processOneFrame

      public double processOneFrame(double input)
      Process a single input frame.
      Parameters:
      input - The input frame
      Returns:
      The output frame