Class ARF1LPFOnePole
java.lang.Object
com.io7m.aradine.filter.recursive1.ARF1LPFOnePole
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleprocessOneFrame(double input) Process a single input frame.voidprocessOneFrameBuffers(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.voidsetCutoff(double newCutoff) Specify a new frequency cutoff value.
-
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]where0effectively blocks all frequencies,0.5blocks roughly half of the higher frequency spectrum, and1.0blocks nothing.- Parameters:
newCutoff- The cutoff
-
processOneFrameBuffers
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 indexinput- The input bufferoutput- The output buffer
-
processOneFrame
public double processOneFrame(double input) Process a single input frame.- Parameters:
input- The input frame- Returns:
- The output frame
-