A Base class for filter based effects including methods for simple high, low and band pass filtering.
More...
#include <AudioEffectsSuite.h>
A Base class for filter based effects including methods for simple high, low and band pass filtering.
- See also
- FilterEffectBase
- Author
- Matthew Hamilton
- Copyright
- MIT License
◆ FilterEffectBase()
◆ ~FilterEffectBase()
◆ allocateBufferMemory()
void allocateBufferMemory |
( |
| ) |
|
|
inlineprotected |
will allocate memory to a buffer given the current filter order and set all values == 0.00
◆ applyFilter()
virtual effectsuite_t applyFilter |
( |
effectsuite_t |
sampVal | ) |
|
|
inlinevirtual |
with the current filter coefficients this method filters a sample then stores it the sample Buffer and increments the index
- Parameters
-
sampVal | is the sample to be processed |
- Returns
- filtered audio sample
◆ changeChebyICoefficients()
bool changeChebyICoefficients |
( |
effectsuite_t |
cutFreq, |
|
|
bool |
shelfType, |
|
|
effectsuite_t |
ripple, |
|
|
int |
poles |
|
) |
| |
|
inlineprotected |
set firCoefficients and iirCoefficients for required chebyshev type I filter sampleBuffer memory is also set @params cutFreq normalised cutoff frequency (0 < x < .5) @params shelfType bool filter shelf type, false = low pass, true = high pass @params ripple percentage ripple (<.2929) @params poles number of poles
- Returns
- boolean false on error and true on success
◆ clearMemory()
checks internal memory storage of filter coeffcients and deletes if required
◆ envelope()
effectsuite_t envelope |
( |
effectsuite_t |
sample | ) |
|
|
inline |
detect the envelop of an incoming signal
- Parameters
-
sample | the incoming signal sample value |
- Returns
- returns envelope dection signal sample value
◆ incBufferIndex()
increment the buffer index and wrap it to the filter order
◆ processDouble()
virtual effectsuite_t processDouble |
( |
effectsuite_t |
inputSample | ) |
|
|
inlineoverridevirtual |
Main process block for applying audio effect.
- Parameters
-
inputSample | The input audio sample for the effect to be applied to |
- Returns
- an audio sample as a effectsuite_t with effect applied
Implements EffectSuiteBase.
Reimplemented in EnvelopeFilter, FilteredDelay, and SimpleChorus.
◆ rms()
effectsuite_t rms |
( |
effectsuite_t |
sample | ) |
|
|
inlineprotected |
root mean square of signal over a specific sample window
◆ setChebyICoefficients()
bool setChebyICoefficients |
( |
effectsuite_t |
cutFreq, |
|
|
bool |
shelfType, |
|
|
effectsuite_t |
ripple |
|
) |
| |
|
inline |
changes the current Chebyshev type 1 coefficients without altering the filter order. This allows for use in an audio process thread as it avoids dynamic allocation of memory. Filter sample and coefficient buffers are unaltered for initialising a chebyshev type 1 filter
- See also
- setChebyICoefficients @params cutFreq normalised cutoff frequency (0 < x < .5) @params shelfType bool Filters shelf type, false = low pass, true = high pass @params ripple percentage ripple (<.2929)
- Returns
- boolean false on error and true on success
◆ setSimpleLpf()
bool setSimpleLpf |
( |
int |
order | ) |
|
|
inlineprotected |
a simple normalised fir low pass filter @params order number of delay coefficients
◆ bufferIndex
◆ filterOrder
order of delay filter including the zero delay coefficients
◆ firBuffer
effectsuite_t* firBuffer = 0 |
|
protected |
buffer to hold forward delay sample data
◆ firCoefficients
effectsuite_t* firCoefficients = 0 |
|
protected |
Numerator coefficients in delay filter firCoefficients[0] z^0 coeffcieint firCoefficients[1] z^-1 coefficient
◆ firTemp
effectsuite_t* firTemp = 0 |
|
protected |
hold temporary values for fir coeffcient buffer
◆ iirBuffer
effectsuite_t* iirBuffer = 0 |
|
protected |
buffer to hold backward delay sample data
◆ iirCoefficients
effectsuite_t* iirCoefficients = 0 |
|
protected |
◆ iirTemp
effectsuite_t* iirTemp = 0 |
|
protected |
hold temporary values for iir coeffcient buffer
◆ rmsBuffer
◆ rmsBufferIndex
current write index of rmsBuffer
◆ rmsWindowSize
const int rmsWindowSize = 128 |
|
protected |
window size in samples of rms window
The documentation for this class was generated from the following file: