AuxPort 0.2
Modules for Audio Software Development
|
Parent class for all FIR Design SubClasses. More...
#include <AuxFIR.h>
Public Types | |
enum | Type { LowPass , HighPass , BandPass , BandReject } |
Represents the type of FIR Filter. More... | |
Public Member Functions | |
FIR (const FIR &response)=default | |
virtual void | filterAlgo ()=0 |
Implement this function with your FIR Algorithm in your Derived Class [Overridable]. | |
void | setSampleRate (uint32_t sampleRate) |
Sets the Sample Rate. | |
void | compute (float passband, float stopband, uint32_t order, Type filterType=Type::LowPass) |
Function designs an FIR by taking in Passband and stopband frequencies for a particular provided Order. | |
void | compute (float cutoffFrequency, uint32_t order, Type filterType=Type::LowPass) |
Function designs an FIR by taking a cutoff frequency for a particular provided Order. | |
void | replace (const std::vector< float > &impulseResponse) |
Method to load an impulse response into an FIR object...can be used with the FIR Engine. | |
void | replace (float *impulseResponse, uint32_t size) |
Method to load an impulse response into an FIR object...can be used with the FIR Engine. | |
void | Log () override |
Logs the Impulse Response onto the Console. | |
std::vector< float > * | getImpulseResponse () |
Returns a pointer to the internal std::vector containing the IR. | |
Protected Member Functions | |
void | normalize () |
Normalize the Impulse Response (In Development) | |
void | spectralReversal () |
Performs spectral reversal of Impulse Response. | |
virtual void | applyWindow () |
Applyies a window on the Impulse Response. | |
![]() | |
void | setColour (const ColourType &colourType) |
This function allows you to set text colour for the text to be printed onto the console. | |
Protected Attributes | |
Type | filterType |
std::vector< float > | impulseResponse |
float | passband = 0 |
float | stopband = 0 |
float | cutoff = 0 |
float | normFreq = 0 |
uint32_t | order = 0 |
uint32_t | sampleRate = 0 |
|
protectedvirtual |
Applyies a window on the Impulse Response.
Reimplemented in AuxPort::Audio::BartlettFIR, AuxPort::Audio::BartlettHannFIR, AuxPort::Audio::BlackmanFIR, AuxPort::Audio::BlackmanHarrisFIR, AuxPort::Audio::FlatFIR, AuxPort::Audio::HammingFIR, AuxPort::Audio::HannFIR, and AuxPort::Audio::NuttallFIR.
Definition at line 39 of file AuxFIR.cpp.
void AuxPort::Audio::FIR::compute | ( | float | cutoffFrequency, |
uint32_t | order, | ||
Type | filterType = Type::LowPass ) |
Function designs an FIR by taking a cutoff frequency for a particular provided Order.
Definition at line 80 of file AuxFIR.cpp.
void AuxPort::Audio::FIR::compute | ( | float | passband, |
float | stopband, | ||
uint32_t | order, | ||
Type | filterType = Type::LowPass ) |
Function designs an FIR by taking in Passband and stopband frequencies for a particular provided Order.
Definition at line 60 of file AuxFIR.cpp.
|
pure virtual |
Implement this function with your FIR Algorithm in your Derived Class [Overridable].
Implemented in AuxPort::Audio::RectangleFIR.
std::vector< float > * AuxPort::Audio::FIR::getImpulseResponse | ( | ) |
Returns a pointer to the internal std::vector containing the IR.
Definition at line 55 of file AuxFIR.cpp.
|
overridevirtual |
Logs the Impulse Response onto the Console.
Reimplemented from AuxPort::ILog.
Definition at line 45 of file AuxFIR.cpp.
|
protected |
Normalize the Impulse Response (In Development)
Definition at line 23 of file AuxFIR.cpp.
void AuxPort::Audio::FIR::replace | ( | const std::vector< float > & | impulseResponse | ) |
Method to load an impulse response into an FIR object...can be used with the FIR Engine.
Definition at line 9 of file AuxFIR.cpp.
void AuxPort::Audio::FIR::replace | ( | float * | impulseResponse, |
uint32_t | size ) |
Method to load an impulse response into an FIR object...can be used with the FIR Engine.
Definition at line 14 of file AuxFIR.cpp.
void AuxPort::Audio::FIR::setSampleRate | ( | uint32_t | sampleRate | ) |
Sets the Sample Rate.
Definition at line 4 of file AuxFIR.cpp.
|
protected |
Performs spectral reversal of Impulse Response.
Definition at line 31 of file AuxFIR.cpp.
|
protected |