Skip to content

Class daisysp::OnePole

ClassList > daisysp > OnePole

One Pole Lowpass / Highpass Filter. More...

  • #include <onepole.h>

Public Types

Type Name
enum FilterMode
Operational modes of the filter.

Public Functions

Type Name
void Init ()
OnePole ()
float Process (float in)
void ProcessBlock (float * in_out, size_t size)
void Reset ()
void SetFilterMode (FilterMode mode)
void SetFrequency (float freq)
~OnePole ()

Detailed Description

Author:

beserge

Date:

Dec 2023 Ported from pichenettes/stmlib/dsp/filter.h

to an independent module. Original code written by Emilie Gillet.

Public Types Documentation

enum FilterMode

Operational modes of the filter.

enum daisysp::OnePole::FilterMode {
    FILTER_MODE_LOW_PASS,
    FILTER_MODE_HIGH_PASS
};

  • LOW_PASS = cuts out high frequency sound, lets low frequency sound pass through
  • HIGH_PASS = cuts out low frequency sound, lets high frequency sound pass through

Public Functions Documentation

function Init

inline void daisysp::OnePole::Init () 

Initializes the module


function OnePole

inline daisysp::OnePole::OnePole () 

function Process

inline float daisysp::OnePole::Process (
    float in
) 

Process audio through the filter

Parameters:

  • in The next sample to be processed

function ProcessBlock

inline void daisysp::OnePole::ProcessBlock (
    float * in_out,
    size_t size
) 

Process a block of audio through the filter

Parameters:

  • in_out Pointer to the block of samples to be processed
  • size Size of the block of samples to be processed.

function Reset

inline void daisysp::OnePole::Reset () 

Reset the module to its default state


function SetFilterMode

inline void daisysp::OnePole::SetFilterMode (
    FilterMode mode
) 

Set the filter mode

Parameters:

  • mode Filter mode. Can be lowpass or highpass

function SetFrequency

inline void daisysp::OnePole::SetFrequency (
    float freq
) 

Set the filter cutoff frequency

Parameters:

  • freq Cutoff frequency. Valid range from 0 to .497f

function ~OnePole

inline daisysp::OnePole::~OnePole () 


The documentation for this class was generated from the following file external-docs/DaisySP/Source/Filters/onepole.h