A Base class for delay based digital effects. Provides the basic methods that are shared amongst Flanger, Delay, Chorus and Phaser.
More...
#include <AudioEffectsSuite.h>
|
| static effectsuite_t ** | interpolationTable = nullptr |
| | Table of interpolation values as a 2D array indexed by interpolationTable[pointIndex][alphaIndex]. One instance per DelayEffectBase<effectsuite_t> instantiation (previously a single namespace-scope global shared – and type-mismatched – across every effectsuite_t choice).
|
| |
| static const int | interpOrder = 4 |
| |
| static const int | interpResolution = 1000 |
| |
template<typename effectsuite_t = effectsuite_t_default>
class audio_tools::DelayEffectBase< effectsuite_t >
A Base class for delay based digital effects. Provides the basic methods that are shared amongst Flanger, Delay, Chorus and Phaser.
- Version
- 0.1
- See also
- DelayEffectBase
- Author
- Matthew Hamilton
- Copyright
- MIT License
◆ DelayEffectBase() [1/3]
template<typename effectsuite_t = effectsuite_t_default>
◆ DelayEffectBase() [2/3]
template<typename effectsuite_t = effectsuite_t_default>
◆ DelayEffectBase() [3/3]
template<typename effectsuite_t = effectsuite_t_default>
◆ ~DelayEffectBase()
template<typename effectsuite_t = effectsuite_t_default>
◆ delaySample()
template<typename effectsuite_t = effectsuite_t_default>
| void delaySample |
( |
effectsuite_t |
inputSample | ) |
|
|
inlineprotected |
store input sample into the delay buffer and increment currentDelayWriteIndex for tracking when to loop back to start of buffer
- Parameters
-
| inputSample | sample to be stored for delay (effectsuite_t) |
◆ getInterpolatedOut()
template<typename effectsuite_t = effectsuite_t_default>
| effectsuite_t getInterpolatedOut |
( |
effectsuite_t |
bufferIndex | ) |
|
|
inlineprotected |
get the value of the requested buffer index by interpolating other points
- Parameters
-
| bufferIndex | The required buffer index |
- Returns
- interpolated output
◆ incDelayBuffReadIndex()
template<typename effectsuite_t = effectsuite_t_default>
| void incDelayBuffReadIndex |
( |
effectsuite_t |
indexInc | ) |
|
|
inlineprotected |
Increments the currentDelayBufferReadIndex by indexInc
- Parameters
-
| indexInc | The amount to increment the delay buffer index |
◆ incDelayBuffWriteIndex()
template<typename effectsuite_t = effectsuite_t_default>
| void incDelayBuffWriteIndex |
( |
| ) |
|
|
inlineprotected |
Increments the currentDelayWriteBufferIndex by 1
◆ setDelayBuffer()
template<typename effectsuite_t = effectsuite_t_default>
| bool setDelayBuffer |
( |
int |
bufferSizeSamples | ) |
|
|
inlineprotected |
Allocates memory for delay buffer and initialises all elements to 0
- Parameters
-
| bufferSizeSamples | the size of delay buffer to be used |
- Returns
- false and error description if there's a problem, or sets the internal delay buffer and returns true
◆ setDelayBuffReadIndex()
template<typename effectsuite_t = effectsuite_t_default>
| void setDelayBuffReadIndex |
( |
effectsuite_t |
index | ) |
|
|
inlineprotected |
sets the currentDelayBufferReadIndex by indexInc (Currently no wrapping)
- Parameters
-
| index | the read index index required |
◆ setInterpolationTable()
template<typename effectsuite_t = effectsuite_t_default>
| static effectsuite_t ** setInterpolationTable |
( |
| ) |
|
|
inlinestaticprotected |
Sets the internal lagrange interpolation table. Ideally it should be shared amongst all
- Returns
- false and an error description if there's a problem, or sets the interpolation lookup table and returns true
◆ setupDelayEffectBase()
template<typename effectsuite_t = effectsuite_t_default>
| void setupDelayEffectBase |
( |
const int |
bufferSizeSamples | ) |
|
|
inline |
<Description#>
- Parameters
-
| bufferSizeSamples | <#bufferSizeSamples description#> |
◆ storeSample()
template<typename effectsuite_t = effectsuite_t_default>
| void storeSample |
( |
effectsuite_t |
inputSample | ) |
|
|
inlineprotected |
store input sample into the delay buffer
- Parameters
-
| inputSample | sample to be stored for delay (effectsuite_t) |
◆ currentDelayReadIndex
template<typename effectsuite_t = effectsuite_t_default>
| effectsuite_t currentDelayReadIndex = 0 |
|
protected |
◆ currentDelayWriteIndex
template<typename effectsuite_t = effectsuite_t_default>
| int currentDelayWriteIndex = 0 |
|
protected |
◆ delayBuffer
template<typename effectsuite_t = effectsuite_t_default>
| effectsuite_t* delayBuffer = 0 |
|
protected |
buffer to stored audio buffer for delay effects
◆ delayTimeSamples
template<typename effectsuite_t = effectsuite_t_default>
| int delayTimeSamples = 44100 |
|
protected |
the delay time of signal in samples
◆ error
template<typename effectsuite_t = effectsuite_t_default>
internal class error boolean
◆ interpolationTable
template<typename effectsuite_t >
| effectsuite_t ** interpolationTable = nullptr |
|
staticprotected |
Table of interpolation values as a 2D array indexed by interpolationTable[pointIndex][alphaIndex]. One instance per DelayEffectBase<effectsuite_t> instantiation (previously a single namespace-scope global shared – and type-mismatched – across every effectsuite_t choice).
◆ interpOrder
template<typename effectsuite_t = effectsuite_t_default>
| const int interpOrder = 4 |
|
staticprotected |
◆ interpResolution
template<typename effectsuite_t = effectsuite_t_default>
| const int interpResolution = 1000 |
|
staticprotected |
◆ maxDelayBufferSize
template<typename effectsuite_t = effectsuite_t_default>
| int maxDelayBufferSize = 441000 |
|
protected |
Maximum number of samples that can be stored in delayBuffer
The documentation for this class was generated from the following file: