VCV Rack API v2
Loading...
Searching...
No Matches
rack::dsp::TRCFilter< T > Struct Template Reference

The simplest possible analog filter using an Euler solver. More...

#include <filter.hpp>

Public Member Functions

 TRCFilter ()
 
void reset ()
 
void setCutoff (T r)
 Sets the cutoff angular frequency in radians.
 
void setCutoffFreq (T f)
 Sets the cutoff frequency.
 
void process (T x)
 
lowpass ()
 
highpass ()
 

Public Attributes

c = 0.f
 
xstate [1]
 
ystate [1]
 

Detailed Description

template<typename T = float>
struct rack::dsp::TRCFilter< T >

The simplest possible analog filter using an Euler solver.

https://en.wikipedia.org/wiki/RC_circuit Use two RC filters in series for a bandpass filter.

Constructor & Destructor Documentation

◆ TRCFilter()

template<typename T = float>
rack::dsp::TRCFilter< T >::TRCFilter ( )
inline

Member Function Documentation

◆ reset()

template<typename T = float>
void rack::dsp::TRCFilter< T >::reset ( )
inline

◆ setCutoff()

template<typename T = float>
void rack::dsp::TRCFilter< T >::setCutoff ( T r)
inline

Sets the cutoff angular frequency in radians.

◆ setCutoffFreq()

template<typename T = float>
void rack::dsp::TRCFilter< T >::setCutoffFreq ( T f)
inline

Sets the cutoff frequency.

f is the ratio between the cutoff frequency and sample rate, i.e. f = f_c / f_s

◆ process()

template<typename T = float>
void rack::dsp::TRCFilter< T >::process ( T x)
inline

◆ lowpass()

template<typename T = float>
T rack::dsp::TRCFilter< T >::lowpass ( )
inline

◆ highpass()

template<typename T = float>
T rack::dsp::TRCFilter< T >::highpass ( )
inline

Member Data Documentation

◆ c

template<typename T = float>
T rack::dsp::TRCFilter< T >::c = 0.f

◆ xstate

template<typename T = float>
T rack::dsp::TRCFilter< T >::xstate[1]

◆ ystate

template<typename T = float>
T rack::dsp::TRCFilter< T >::ystate[1]

The documentation for this struct was generated from the following file: