Mozzi  version v2.0
sound synthesis library for Arduino
WaveFolder< T > Class Template Reference

A simple wavefolder. More...

#include <WaveFolder.h>

Detailed Description

template<typename T = AudioOutputStorage_t>
class WaveFolder< T >

A simple wavefolder.

Definition at line 37 of file WaveFolder.h.

Public Member Functions

 WaveFolder ()
 Constructor.
 
void setHighLimit (T highLimit)
 Set the high limit where the wave will start to be folded back the other way. More...
 
void setLowLimit (T lowLimit)
 Set the low limit where the wave will start to be folded back the other way. More...
 
void setLimits (T lowLimit, T highLimit)
 Set the low and the high limits at the same time. More...
 
next (T in)
 Return the next folded sample. More...
 

Member Function Documentation

◆ next()

template<typename T = AudioOutputStorage_t>
T WaveFolder< T >::next ( in)
inline

Return the next folded sample.

Parameters
inis the signal input.
Returns
the folded output.

Definition at line 85 of file WaveFolder.h.

◆ setHighLimit()

template<typename T = AudioOutputStorage_t>
void WaveFolder< T >::setHighLimit ( highLimit)
inline

Set the high limit where the wave will start to be folded back the other way.

Parameters
highLimitthe high limit used by the wavefolder.

Definition at line 48 of file WaveFolder.h.

◆ setLimits()

template<typename T = AudioOutputStorage_t>
void WaveFolder< T >::setLimits ( lowLimit,
highLimit 
)
inline

Set the low and the high limits at the same time.

Parameters
lowLimitthe low limit used by the wavefolder
highLimitthe high limit used by the wavefolder
Note
highLimit MUST be higher than lowLimit

Definition at line 72 of file WaveFolder.h.

◆ setLowLimit()

template<typename T = AudioOutputStorage_t>
void WaveFolder< T >::setLowLimit ( lowLimit)
inline

Set the low limit where the wave will start to be folded back the other way.

Parameters
lowLimitthe low limit used by the wavefolder.

Definition at line 59 of file WaveFolder.h.