Mozzi  version v2.0
sound synthesis library for Arduino
DCfilter Class Reference

A DC-blocking filter useful for highlighting changes in control signals. More...

#include <DCfilter.h>

Detailed Description

A DC-blocking filter useful for highlighting changes in control signals.

The output of the filter settles to 0 if the incoming signal stays constant. If the input changes, the filter output swings to track the change and eventually settles back to 0.

Definition at line 32 of file DCfilter.h.

Public Member Functions

 DCfilter (float pole)
 Instantiate a DC-blocking filter. More...
 
int next (int x)
 Filter the incoming value and return the result. More...
 

Constructor & Destructor Documentation

◆ DCfilter()

DCfilter::DCfilter ( float  pole)
inline

Instantiate a DC-blocking filter.

Parameters
polesets the responsiveness of the filter, how long it takes to settle to 0 if the input signal levels out at a constant value.

Definition at line 40 of file DCfilter.h.

Member Function Documentation

◆ next()

int DCfilter::next ( int  x)
inline

Filter the incoming value and return the result.

Parameters
xthe value to filter
Returns
filtered signal

Definition at line 69 of file DCfilter.h.