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>
|
| SimpleFlanger ()=default |
|
| SimpleFlanger (effectsuite_t extSampleRate=44100) |
|
| SimpleFlanger (SimpleFlanger ©)=default |
|
| ~SimpleFlanger ()=default |
|
virtual bool | active () |
| determines if the effect is active
|
|
SimpleFlanger * | clone () override |
|
int | id () |
| Allows to identify an effect.
|
|
effectsuite_t | processDouble (effectsuite_t inputSample) override |
|
virtual void | setActive (bool value) |
| sets the effect active/inactive
|
|
void | setDepth (const effectsuite_t depth) |
|
void | setEffectGain (effectsuite_t gain) |
|
void | setEffectParams (effectsuite_t gain, effectsuite_t depth, effectsuite_t rate) |
|
void | setId (int id) |
| Allows to identify an effect.
|
|
void | setRate (const effectsuite_t rate) |
|
void | setupDelayEffectBase (const int bufferSizeSamples) |
|
void | setupSimpleFlanger (effectsuite_t extSampleRate) |
|
|
bool | active_flag = true |
|
effectsuite_t | angleDelta = 2.0f * 3.141592653589793f * timeStep |
|
effectsuite_t | currentDelayReadIndex = 0 |
|
int | currentDelayWriteIndex = 0 |
|
effectsuite_t * | delayBuffer = 0 |
|
int | delayTimeSamples = 44100 |
|
effectsuite_t | effectGain = .01 |
|
bool | error |
|
int | id_value = -1 |
|
int | maxDelayBufferSize = 441000 |
|
effectsuite_t | modulationAngle = 0 |
|
effectsuite_t | modulationConstant |
|
effectsuite_t | modulationDepth = 1000 |
|
effectsuite_t | modulationIndex = 0 |
|
effectsuite_t | modulationRate = 0 |
|
effectsuite_t | timeStep = 1. / 44100. |
|
|
static const int | interpOrder = 4 |
|
static const int | interpResolution = 1000 |
|
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()
Constructor: DigitalEffect Base Must Be initialised
- See also
- DelayEffectBase constructor
◆ ~SimpleFlanger()
◆ capGain()
effectsuite_t capGain |
( |
effectsuite_t |
gain | ) |
|
|
inlineprotected |
capGain: caps gain to a range of 1 and -1;
- Parameters
-
gain | address of gain value |
◆ delaySample()
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()
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
◆ incDelayBuffReadIndex()
void incDelayBuffReadIndex |
( |
effectsuite_t |
indexInc | ) |
|
|
inlineprotectedinherited |
Increments the currentDelayBufferReadIndex by indexInc
- Parameters
-
indexInc | The amount to increment the delay buffer index |
◆ incDelayBuffWriteIndex()
void incDelayBuffWriteIndex |
( |
| ) |
|
|
inlineprotectedinherited |
Increments the currentDelayWriteBufferIndex by 1
◆ processDouble()
effectsuite_t processDouble |
( |
effectsuite_t |
inputSample | ) |
|
|
inlineoverridevirtual |
◆ setAngleDelta()
setAngleDelta: sets the angleDelta for delay modulation
◆ setDelayBuffer()
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()
void setDelayBuffReadIndex |
( |
effectsuite_t |
index | ) |
|
|
inlineprotectedinherited |
sets the currentDelayBufferReadIndex by indexInc (Currently no wrapping)
- Parameters
-
index | the read index index required |
◆ setDepth()
void setDepth |
( |
const effectsuite_t |
depth | ) |
|
|
inline |
<#Description#>
- Parameters
-
depth | <#depth description#> |
◆ setEffectGain()
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()
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 |
◆ setInterpolationTable()
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()
void setRate |
( |
const effectsuite_t |
rate | ) |
|
|
inline |
<#Description#>
- Parameters
-
◆ setupDelayEffectBase()
void setupDelayEffectBase |
( |
const int |
bufferSizeSamples | ) |
|
|
inlineinherited |
<#Description#>
- Parameters
-
bufferSizeSamples | <#bufferSizeSamples description#> |
◆ storeSample()
void storeSample |
( |
effectsuite_t |
inputSample | ) |
|
|
inlineprotectedinherited |
store input sample into the delay buffer
- Parameters
-
inputSample | sample to be stored for delay (effectsuite_t) |
◆ updateModulation()
void updateModulation |
( |
| ) |
|
|
inlineprotected |
updateModulation: updates the modulationIndex by the correct increment
◆ angleDelta
effectsuite_t angleDelta = 2.0f * 3.141592653589793f * timeStep |
|
protected |
increment value for modulation signal
◆ delayBuffer
effectsuite_t* delayBuffer = 0 |
|
protectedinherited |
buffer to stored audio buffer for delay effects
◆ delayTimeSamples
int delayTimeSamples = 44100 |
|
protectedinherited |
the delay time of signal in samples
◆ error
internal class error boolean
◆ maxDelayBufferSize
int maxDelayBufferSize = 441000 |
|
protectedinherited |
Maximum number of samples that can be stored in delayBuffer
◆ modulationConstant
effectsuite_t modulationConstant |
|
protected |
2 * pi * modulationRate / sampleRate
◆ timeStep
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: