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>
|
effectsuite_t | interpTable [order][res] |
|
bool | is_noise = false |
|
|
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.
- Author
- Matthew Hamilton
- Copyright
- MIT License
◆ ModulationBaseClass()
◆ ~ModulationBaseClass()
◆ allocateMemory()
allocate memory to internal wave table based on sample rate
- Returns
- returns true on success or false on failure
◆ clipWave()
void clipWave |
( |
effectsuite_t |
amp | ) |
|
|
inline |
clip wave table values with a tanh function. Effect change with a variable amp to control intensity.
- Parameters
-
amp | amount to multiply signal before being fed through a tanh function |
◆ getInterpOut()
effectsuite_t getInterpOut |
( |
effectsuite_t |
bufferIndex | ) |
|
|
inlineprotected |
get the interpolated output of the waveTable from the given buffer index
- Parameters
-
bufferIndex | buffer index as effectsuite_t |
- Returns
- returns interpolated value from surrounding wavtable indices
◆ getSplineOut()
effectsuite_t getSplineOut |
( |
effectsuite_t |
bufferIndex, |
|
|
int |
freq |
|
) |
| |
|
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
- Authors
- Matthew Hamilton, Alec Wright
- Parameters
-
bufferIndex | the required buffer index |
freq | (speed) that the table is being read through |
- Returns
- returns interpolated value as effectsuite_t
◆ readNoise()
effectsuite_t readNoise |
( |
| ) |
|
|
inline |
reads out white noise
- Returns
- random number between -1 and 1
◆ readTable()
effectsuite_t readTable |
( |
effectsuite_t |
freq | ) |
|
|
inline |
Read through values in waveTable as a given frequency
- Parameters
-
freq | read speed in Hz: essentially the number of samples jumped between reads |
- Returns
- value from table as effectsuite_t
◆ setDC()
◆ setInterpTable()
populates the internal interpolation table
- Returns
- return tru on success, else false
◆ setOffSine()
sets wavetable to one period of a sine wave oscillating between 0 and 1
◆ setRamp()
set wave table to be a ramp from 0 to 1
◆ setSawtooth()
sets wavetable to one period of a sawtooth wave
◆ setSine()
sets wavetable to one period of a sine wave oscillating between -1 and 1
◆ setSquare()
sets wavetable to one period of a square wave
◆ setTriangle()
sets wavetable to one period of a triangle wave
◆ setupModulationBaseClass()
void setupModulationBaseClass |
( |
effectsuite_t |
extSampRate | ) |
|
|
inline |
setup the class with a given sample rate. Basically reperforming the constructor
- Parameters
-
extSampRate | External sample rate |
◆ sampleRate
◆ tableIndex
effectsuite_t tableIndex = 0 |
◆ timeStep
time between samples: 1/sampRate
◆ waveTable
store modulation signal as
The documentation for this class was generated from the following file: