DaisySP
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
daisysp::OnePole Class Reference

One Pole Lowpass / Highpass Filter. More...

#include <onepole.h>

Public Types

enum  FilterMode { FILTER_MODE_LOW_PASS , FILTER_MODE_HIGH_PASS }
 Operational modes of the filter. More...
 

Public Member Functions

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

Detailed Description

One Pole Lowpass / Highpass Filter.

Author
beserge
Date
Dec 2023 Ported from pichenettes/stmlib/dsp/filter.h

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

Member Enumeration Documentation

◆ FilterMode

Operational modes of the filter.

  • 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

Member Function Documentation

◆ Init()

void daisysp::OnePole::Init ( )
inline

Initializes the module

◆ Process()

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

Process audio through the filter

Parameters
inThe next sample to be processed

◆ ProcessBlock()

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

Process a block of audio through the filter

Parameters
in_outPointer to the block of samples to be processed
sizeSize of the block of samples to be processed.

◆ Reset()

void daisysp::OnePole::Reset ( )
inline

Reset the module to its default state

◆ SetFilterMode()

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

Set the filter mode

Parameters
modeFilter mode. Can be lowpass or highpass

◆ SetFrequency()

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

Set the filter cutoff frequency

Parameters
freqCutoff frequency. Valid range from 0 to .497f

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