|
arduino-audio-tools
|
Class provides a wave table that can be populated with a number of preallocated waveforms. These can be used to generate audio in themselves or to modulate The parameters of another effect. Class initialised with sample rate. More...
#include <AudioEffectsSuite.h>
Public Member Functions | |
| ModulationBaseClass () | |
| ModulationBaseClass (effectsuite_t extSampRate) | |
| ModulationBaseClass (ModulationBaseClass ©)=default | |
| ~ModulationBaseClass ()=default | |
| void | clipWave (effectsuite_t amp) |
| bool | isNoise () |
| void | printInterpTable () |
| effectsuite_t | readNoise () |
| effectsuite_t | readTable (effectsuite_t freq) |
| void | setDC () |
| bool | setInterpTable () |
| void | setNoise () |
| void | setOffSine () |
| void | setRamp () |
| void | setSawtooth () |
| void | setSine () |
| void | setSquare () |
| void | setTriangle () |
| void | setupModulationBaseClass (effectsuite_t extSampRate) |
| setup the class with a given sample rate. Basically reperforming the constructor | |
Public Attributes | |
| int | sampleRate |
| effectsuite_t | tableIndex = 0 |
| effectsuite_t | timeStep |
| effectsuite_t * | waveTable |
Protected Member Functions | |
| bool | allocateMemory () |
| effectsuite_t | getInterpOut (effectsuite_t bufferIndex) |
| effectsuite_t | getSplineOut (effectsuite_t bufferIndex, int freq) |
Protected Attributes | |
| effectsuite_t | interpTable [order][res] |
| bool | is_noise = false |
Static Protected Attributes | |
| static const int | order = 4 |
| static const int | res = 100 |
Class provides a wave table that can be populated with a number of preallocated waveforms. These can be used to generate audio in themselves or to modulate The parameters of another effect. Class initialised with sample rate.
|
inline |
Constructor
|
default |
|
inline |
|
default |
Destructor
|
inlineprotected |
allocate memory to internal wave table based on sample rate
|
inline |
clip wave table values with a tanh function. Effect change with a variable amp to control intensity.
| amp | amount to multiply signal before being fed through a tanh function |
|
inlineprotected |
get the interpolated output of the waveTable from the given buffer index
| bufferIndex | buffer index as effectsuite_t |
|
inlineprotected |
get a cubic spline interpolated out from the wave table
Derived from code by Alec Wright at repository: https://github.com/Alec-Wright/Chorus
| bufferIndex | the required buffer index |
| freq | (speed) that the table is being read through |
|
inline |
|
inline |
|
inline |
reads out white noise
|
inline |
Read through values in waveTable as a given frequency
| freq | read speed in Hz: essentially the number of samples jumped between reads |
|
inline |
sets wavetable to DC one
|
inline |
populates the internal interpolation table
|
inline |
|
inline |
sets wavetable to one period of a sine wave oscillating between 0 and 1
|
inline |
set wave table to be a ramp from 0 to 1
|
inline |
sets wavetable to one period of a sawtooth wave
|
inline |
sets wavetable to one period of a sine wave oscillating between -1 and 1
|
inline |
sets wavetable to one period of a square wave
|
inline |
sets wavetable to one period of a triangle wave
|
inline |
setup the class with a given sample rate. Basically reperforming the constructor
| extSampRate | External sample rate |
|
protected |
| int sampleRate |
Internal Sample Rate
| effectsuite_t tableIndex = 0 |
current table read index
| effectsuite_t timeStep |
time between samples: 1/sampRate
| effectsuite_t* waveTable |
store modulation signal as