A generic resonant filter for audio signals. More...
#include <ResonantFilter.h>
A generic resonant filter for audio signals.
Definition at line 75 of file ResonantFilter.h.
Public Member Functions | |
| ResonantFilter () | |
| Constructor. | |
| void | setCutoffFreq (su cutoff) |
| deprecated. More... | |
| void | setResonance (su resonance) |
| deprecated. More... | |
| void | setCutoffFreqAndResonance (su cutoff, su resonance) |
| Set the cut off frequency and resonance. More... | |
| AudioOutputStorage_t | next (AudioOutputStorage_t in) |
| Calculate the next sample, given an input signal. More... | |
Protected Member Functions | |
| void | advanceBuffers (AudioOutputStorage_t in) |
| AudioOutputStorage_t | current (AudioOutputStorage_t in, Int2Type< LOWPASS >) |
| AudioOutputStorage_t | current (AudioOutputStorage_t in, Int2Type< HIGHPASS >) |
| AudioOutputStorage_t | current (AudioOutputStorage_t in, Int2Type< BANDPASS >) |
| AudioOutputStorage_t | current (AudioOutputStorage_t in, Int2Type< NOTCH >) |
| IntegerType< sizeof(su)+sizeof(su)>::unsigned_type | ucfxmul (su a, typename IntegerType< sizeof(su)+sizeof(su)>::unsigned_type b) |
| IntegerType< sizeof(AudioOutputStorage_t)+sizeof(su) -1 >::signed_type | ifxmul (typename IntegerType< sizeof(AudioOutputStorage_t)+sizeof(su) -1 >::signed_type a, su b) |
| IntegerType< sizeof(AudioOutputStorage_t)+sizeof(AudioOutputStorage_t)>::signed_type | fxmul (typename IntegerType< sizeof(AudioOutputStorage_t)+sizeof(AudioOutputStorage_t)>::signed_type a, typename IntegerType< sizeof(AudioOutputStorage_t)+sizeof(su) -1 >::signed_type b) |
Protected Attributes | |
| su | q |
| su | f |
| IntegerType< sizeof(su)+sizeof(su)>::unsigned_type | fb |
| AudioOutputStorage_t | buf0 |
| AudioOutputStorage_t | buf1 |
| const uint8_t | FX_SHIFT |
| const uint8_t | FX_SHIFT_M_1 |
| const su | SHIFTED_1 |
|
inline |
Calculate the next sample, given an input signal.
| in | the signal input. Should not be more than 8bits on 8bits platforms (Arduino) if using the 8bits version and not 16bits version. |
Definition at line 128 of file ResonantFilter.h.
|
inline |
deprecated.
Use setCutoffFreqAndResonance(su cutoff, su resonance).
Set the cut off frequency,
| cutoff | use the range 0-255 to represent 0-8191 Hz (MOZZI_AUDIO_RATE/2) for ResonantFilter, cutoff use the range 0-65535 to represent 0-MOZZI_AUDIO_RATE/2. Be careful of distortion at the lower end, especially with high resonance. |
Definition at line 91 of file ResonantFilter.h.
|
inline |
Set the cut off frequency and resonance.
Replaces setCutoffFreq() and setResonance(). (Because the internal calculations need to be done whenever either parameter changes.)
| cutoff | range 0-255 represents 0-8191 Hz (MOZZI_AUDIO_RATE/2) for ResonantFilter, range 0-65535 for ResonantFilter16 Be careful of distortion at the lower end, especially with high resonance. |
| resonance | range 0-255 for ResonantFilter, 0-65535 for ResonantFilter<FILTER_TYPE, uint16_t>, 255/65535 is most resonant. |
Definition at line 114 of file ResonantFilter.h.
|
inline |
deprecated.
Use setCutoffFreqAndResonance(su cutoff, su resonance).
Set the resonance. If you hear unwanted distortion, back off the resonance. After setting resonance, you need to call setCuttoffFreq() to hear the change!
| resonance | in the range 0-255 for ResonantFilter, 0-65535 for ResonantFilter<FILTER_TYPE, uint16_t>, with 255/65535 being most resonant |
Definition at line 105 of file ResonantFilter.h.