33 #ifndef _NSOUND_FILTER_IIR_H_
34 #define _NSOUND_FILTER_IIR_H_
72 const Buffer & frequency_response,
73 const float64 & max_error = 0.01,
74 const int32 max_iterations = 1000);
84 const Buffer & impulse_response,
85 const float64 & max_error = 0.01,
86 const int32 max_iterations = 1000);
148 const int32 max_iterations,
std::ostream & operator<<(std::ostream &out, const Buffer &rhs_buffer)
Buffer filter(const Buffer &x)
friend std::ostream & operator<<(std::ostream &out, const FilterIIR &rhs)
Prints the coeffents.
Buffer filter(const Buffer &x, const Buffer &frequencies)
FilterIIR & operator=(const FilterIIR &rhs)
AudioStream filter(const AudioStream &x)
Buffer getImpulseResponse(const uint32 n_samples=8192)
Buffer designFrequencyResponse(const Buffer &frequency_response, const float64 &max_error=0.01, const int32 max_iterations=1000)
Designs a filter kernel using a genetic algorithm that trys to match the provided frequency response...
float64 getRMS(const Kernel &kernel, const Buffer &response, const SignalType type)
Base class for IIR Filters, defines the interface.
AudioStream filter(const AudioStream &x)
Buffer getImpulseResponse(const uint32 n_samples=8192)
AudioStream filter(const AudioStream &x, const Buffer &frequencies)
void savePlot(const Kernel &k, const Buffer &response, uint32 n, const float64 &error)
A Buffer for storing audio samples.
Buffer designImpulseResponse(const Buffer &impulse_response, const float64 &max_error=0.01, const int32 max_iterations=1000)
Designs a filter kernel using a genetic algorithm that trys to match the provided impulse response...
FilterIIR(const float64 &sample_rate, uint32 n_poles)
uint32 getKernelSize() const
Buffer designKernel(const Buffer &response, const float64 &max_rms_error, const int32 max_iterations, const SignalType type)
Designs a filter kernel that trys to match the provide frequency response.