# Class ARF1LPFOnePole

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

public final class ARF1LPFOnePole extends Object
A trivial, recursive, one-pole low pass filter. Filter instances are stateful (they store the most recently processed output frame) and therefore each instance should only be used on a single audio stream.

See Also:
  - "https://www.dspguide.com/ch19.htm"

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ARF1LPFOnePole()`
  Create a new filter.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `double`
  `processOneFrame(double input)`
  Process a single input frame.
  `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.
  `void`
  `setCutoff(double newCutoff)`
  Specify a new frequency cutoff value.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ARF1LPFOnePole

    public ARF1LPFOnePole()
    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 all frequencies, `0.5` blocks roughly half of the higher frequency spectrum, and `1.0` blocks nothing.

    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