Simple Flanger Effect Consistig of a single voice flanger The flanger has an effective range between 0 and 15 miliseconds in this case dleay buffer should be set to sampleRate*3/200 Constructor requires internal delay in samples.
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::SimpleFlanger< effectsuite_t >
Simple Flanger Effect Consistig of a single voice flanger The flanger has an effective range between 0 and 15 miliseconds in this case dleay buffer should be set to sampleRate*3/200 Constructor requires internal delay in samples.
- See also
- process
- Author
- Matthew Hamilton
- Copyright
- MIT License
◆ SimpleFlanger() [1/3]
template<typename effectsuite_t = effectsuite_t_default>
Constructor: DigitalEffect Base Must Be initialised
- See also
- DelayEffectBase constructor
◆ SimpleFlanger() [2/3]
template<typename effectsuite_t = effectsuite_t_default>
◆ SimpleFlanger() [3/3]
template<typename effectsuite_t = effectsuite_t_default>
◆ ~SimpleFlanger()
template<typename effectsuite_t = effectsuite_t_default>
◆ active()
determines if the effect is active
◆ capGain()
template<typename effectsuite_t = effectsuite_t_default>
| effectsuite_t capGain |
( |
effectsuite_t |
gain | ) |
|
|
inlineprotected |
capGain: caps gain to a range of 1 and -1;
- Parameters
-
| gain | address of gain value |
◆ clip()
| int16_t clip |
( |
int32_t |
in, |
|
|
int16_t |
clipLimit = 32767, |
|
|
int16_t |
resultLimit = 32767 |
|
) |
| |
|
inlineprotectedinherited |
◆ clone()
template<typename effectsuite_t = effectsuite_t_default>
◆ copyParent()
◆ delaySample()
template<typename effectsuite_t = effectsuite_t_default>
| void delaySample |
( |
effectsuite_t |
inputSample | ) |
|
|
inlineprotectedinherited |
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 | ) |
|
|
inlineprotectedinherited |
get the value of the requested buffer index by interpolating other points
- Parameters
-
| bufferIndex | The required buffer index |
- Returns
- interpolated output
◆ id()
Allows to identify an effect.
◆ incDelayBuffReadIndex()
template<typename effectsuite_t = effectsuite_t_default>
| void incDelayBuffReadIndex |
( |
effectsuite_t |
indexInc | ) |
|
|
inlineprotectedinherited |
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 |
( |
| ) |
|
|
inlineprotectedinherited |
Increments the currentDelayWriteBufferIndex by 1
◆ processFloat()
template<typename effectsuite_t = effectsuite_t_default>
| effectsuite_t processFloat |
( |
effectsuite_t |
inputSample | ) |
|
|
inlineoverridevirtual |
◆ setActive()
| virtual void setActive |
( |
bool |
value | ) |
|
|
inlinevirtualinherited |
sets the effect active/inactive
◆ setAngleDelta()
template<typename effectsuite_t = effectsuite_t_default>
setAngleDelta: sets the angleDelta for delay modulation
◆ setDelayBuffer()
template<typename effectsuite_t = effectsuite_t_default>
| bool setDelayBuffer |
( |
int |
bufferSizeSamples | ) |
|
|
inlineprotectedinherited |
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 | ) |
|
|
inlineprotectedinherited |
sets the currentDelayBufferReadIndex by indexInc (Currently no wrapping)
- Parameters
-
| index | the read index index required |
◆ setDepth()
template<typename effectsuite_t = effectsuite_t_default>
| void setDepth |
( |
const effectsuite_t |
depth | ) |
|
|
inline |
◆ setEffectGain()
template<typename effectsuite_t = effectsuite_t_default>
| void setEffectGain |
( |
effectsuite_t |
gain | ) |
|
|
inline |
setEffectGain: sets the effect gain to a value between 1 and -1
- Parameters
-
| gain | required delay gain. Values beyond 1 and -1 are capped to the maximum to avoid idiocy. Negative velus invoke a phase inversion. |
◆ setEffectParams()
template<typename effectsuite_t = effectsuite_t_default>
| void setEffectParams |
( |
effectsuite_t |
gain, |
|
|
effectsuite_t |
depth, |
|
|
effectsuite_t |
rate |
|
) |
| |
|
inline |
setEffectGain: sets the parameters for effect
- Parameters
-
| gain | effect gain |
| depth | depth of modulation in samples |
| rate | rate of modulation in Hz |
◆ setId()
Allows to identify an effect.
◆ setInterpolationTable()
template<typename effectsuite_t = effectsuite_t_default>
| static effectsuite_t ** setInterpolationTable |
( |
| ) |
|
|
inlinestaticprotectedinherited |
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
◆ setRate()
template<typename effectsuite_t = effectsuite_t_default>
| void setRate |
( |
const effectsuite_t |
rate | ) |
|
|
inline |
◆ setupDelayEffectBase()
template<typename effectsuite_t = effectsuite_t_default>
| void setupDelayEffectBase |
( |
const int |
bufferSizeSamples | ) |
|
|
inlineinherited |
<Description#>
- Parameters
-
| bufferSizeSamples | <#bufferSizeSamples description#> |
◆ setupSimpleFlanger()
template<typename effectsuite_t = effectsuite_t_default>
| void setupSimpleFlanger |
( |
effectsuite_t |
extSampleRate | ) |
|
|
inline |
◆ storeSample()
template<typename effectsuite_t = effectsuite_t_default>
| void storeSample |
( |
effectsuite_t |
inputSample | ) |
|
|
inlineprotectedinherited |
store input sample into the delay buffer
- Parameters
-
| inputSample | sample to be stored for delay (effectsuite_t) |
◆ updateModulation()
template<typename effectsuite_t = effectsuite_t_default>
| void updateModulation |
( |
| ) |
|
|
inlineprotected |
updateModulation: updates the modulationIndex by the correct increment
◆ active_flag
◆ angleDelta
template<typename effectsuite_t = effectsuite_t_default>
| effectsuite_t angleDelta = 2.0f * 3.141592653589793f * timeStep |
|
protected |
increment value for modulation signal
◆ currentDelayReadIndex
template<typename effectsuite_t = effectsuite_t_default>
| effectsuite_t currentDelayReadIndex = 0 |
|
protectedinherited |
◆ currentDelayWriteIndex
template<typename effectsuite_t = effectsuite_t_default>
| int currentDelayWriteIndex = 0 |
|
protectedinherited |
◆ delayBuffer
template<typename effectsuite_t = effectsuite_t_default>
| effectsuite_t* delayBuffer = 0 |
|
protectedinherited |
buffer to stored audio buffer for delay effects
◆ delayTimeSamples
template<typename effectsuite_t = effectsuite_t_default>
| int delayTimeSamples = 44100 |
|
protectedinherited |
the delay time of signal in samples
◆ effectGain
template<typename effectsuite_t = effectsuite_t_default>
| effectsuite_t effectGain = .01 |
|
protected |
◆ error
template<typename effectsuite_t = effectsuite_t_default>
internal class error boolean
◆ id_value
◆ interpolationTable
template<typename effectsuite_t >
| effectsuite_t ** interpolationTable = nullptr |
|
staticprotectedinherited |
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 |
|
staticprotectedinherited |
◆ interpResolution
template<typename effectsuite_t = effectsuite_t_default>
| const int interpResolution = 1000 |
|
staticprotectedinherited |
◆ maxDelayBufferSize
template<typename effectsuite_t = effectsuite_t_default>
| int maxDelayBufferSize = 441000 |
|
protectedinherited |
Maximum number of samples that can be stored in delayBuffer
◆ modulationAngle
template<typename effectsuite_t = effectsuite_t_default>
| effectsuite_t modulationAngle = 0 |
|
protected |
◆ modulationConstant
template<typename effectsuite_t = effectsuite_t_default>
| effectsuite_t modulationConstant |
|
protected |
2 * pi * modulationRate / sampleRate
◆ modulationDepth
template<typename effectsuite_t = effectsuite_t_default>
| effectsuite_t modulationDepth = 1000 |
|
protected |
◆ modulationIndex
template<typename effectsuite_t = effectsuite_t_default>
| effectsuite_t modulationIndex = 0 |
|
protected |
◆ modulationRate
template<typename effectsuite_t = effectsuite_t_default>
| effectsuite_t modulationRate = 0 |
|
protected |
◆ timeStep
template<typename effectsuite_t = effectsuite_t_default>
| effectsuite_t timeStep = 1. / 44100. |
|
protected |
1/sampleRate: The time in seconds between samples
The documentation for this class was generated from the following file: