Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
Public Member Functions | List of all members
sbl::dsp::Waveshaper< Size > Class Template Reference

#include <waveshaper.hpp>

Collaboration diagram for sbl::dsp::Waveshaper< Size >:

Public Member Functions

void set_table (const float *table)
 Set the transfer function table (Size+1 entries with guard)
 
float process (float x) const
 Process a single sample through the transfer function.
 
void process (float *buf, uint16_t frames) const
 Process a block of samples in-place.
 

Detailed Description

template<uint16_t Size>
class sbl::dsp::Waveshaper< Size >

Definition at line 21 of file waveshaper.hpp.

Member Function Documentation

◆ process() [1/2]

template<uint16_t Size>
void sbl::dsp::Waveshaper< Size >::process ( float *  buf,
uint16_t  frames 
) const
inline

Process a block of samples in-place.

Definition at line 50 of file waveshaper.hpp.

References sbl::dsp::Waveshaper< Size >::process().

Here is the call graph for this function:

◆ process() [2/2]

template<uint16_t Size>
float sbl::dsp::Waveshaper< Size >::process ( float  x) const
inline

Process a single sample through the transfer function.

Input [-1.0, 1.0] maps to full table range. Values outside this range are clamped.

Definition at line 34 of file waveshaper.hpp.

References sbl::dsp::lut::lookup_linear().

Referenced by sbl::dsp::Waveshaper< Size >::process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_table()

template<uint16_t Size>
void sbl::dsp::Waveshaper< Size >::set_table ( const float *  table)
inline

Set the transfer function table (Size+1 entries with guard)

Note
All public methods are ISR-safe — bounded computation, no I/O.

Definition at line 26 of file waveshaper.hpp.


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