Skip to content

daisysp::Decimator

More...

#include <decimator.h>

Public Functions

Name
Decimator()
~Decimator()
void Init()
float Process(float input)
void SetDownsampleFactor(float downsample_factor)
void SetBitcrushFactor(float bitcrush_factor)
void SetBitsToCrush(const uint8_t & bits)
void SetSmoothCrushing(bool smooth_crushing)
bool GetSmoothCrushing()
float GetDownsampleFactor()
float GetBitcrushFactor()
int GetBitsToCrush()

Detailed Description

class daisysp::Decimator;

Performs downsampling and bitcrush effects

Public Functions Documentation

function Decimator

inline Decimator()

function ~Decimator

inline ~Decimator()

function Init

void Init()

Initializes downsample module


function Process

float Process(
    float input
)

Return: one sample. This should be called once per sample period.

Applies downsample and bitcrush effects to input signal.


function SetDownsampleFactor

inline void SetDownsampleFactor(
    float downsample_factor
)

Sets amount of downsample Input range:


function SetBitcrushFactor

inline void SetBitcrushFactor(
    float bitcrush_factor
)

Sets amount of bitcrushing Input range: 0...1.0


function SetBitsToCrush

inline void SetBitsToCrush(
    const uint8_t & bits
)

Sets the exact number of bits to crush and disables smooth crushing 0-16 bits


function SetSmoothCrushing

inline void SetSmoothCrushing(
    bool smooth_crushing
)

Sets the smooth crushing on or off true/false


function GetSmoothCrushing

inline bool GetSmoothCrushing()

Returns current setting of smooth crushing


function GetDownsampleFactor

inline float GetDownsampleFactor()

Returns current setting of downsample


function GetBitcrushFactor

inline float GetBitcrushFactor()

Returns current setting of bitcrush


function GetBitsToCrush

inline int GetBitsToCrush()

Returns current bitcrush setting in bits

---

Updated on 2024-01-03 at 19:38:46 +0000