Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
sbl::dsp::comp::BitCrusher Class Reference

Detailed Description

Definition at line 29 of file bit_crusher.hpp.

#include <bit_crusher.hpp>

Public Member Functions

void set_depth_su (float su)
 
void process (float *buf, uint16_t n)
 
void reset ()
 

Static Public Attributes

static constexpr float kMaxBits = 16.0f
 
static constexpr float kMinBits = 2.0f
 

Member Function Documentation

◆ set_depth_su()

void sbl::dsp::comp::BitCrusher::set_depth_su ( float  su)
inline

Port: set bit reduction depth [0, 1]. 0.0 = full resolution (bypass), 1.0 = minimum bits. No smoothing — quantization grid changes must be instant. Smoothing a quantizer creates inter-grid artifacts (crackling). The pot deadband + cam table interpolation provide sufficient continuity.

Definition at line 39 of file bit_crusher.hpp.

◆ process()

void sbl::dsp::comp::BitCrusher::process ( float *  buf,
uint16_t  n 
)
inline

Process a block of samples in-place. Depth is constant across the block.

Definition at line 43 of file bit_crusher.hpp.

References kMaxBits, kMinBits, sbl::dsp::primitives::BitReducer::process(), and sbl::dsp::primitives::BitReducer::set_bits().

◆ reset()

void sbl::dsp::comp::BitCrusher::reset ( )
inline

Definition at line 51 of file bit_crusher.hpp.

Member Data Documentation

◆ kMaxBits

constexpr float sbl::dsp::comp::BitCrusher::kMaxBits = 16.0f
staticconstexpr

Definition at line 31 of file bit_crusher.hpp.

Referenced by process().

◆ kMinBits

constexpr float sbl::dsp::comp::BitCrusher::kMinBits = 2.0f
staticconstexpr

Definition at line 32 of file bit_crusher.hpp.

Referenced by process().


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