src/filter.cpp
// 4th-order Butterworth bandpass
// 300 Hz to 5000 Hz @ 48.8281250 kHz
// Create with MATLAB like so:
/*
n = 4; % filter order
sr = 48828.1250;
Wn = [300 5000] * 2 / sr;
[B,A] = butter(n/2,Wn);
sprintf('B.push_back(%0.15e);\n',B)
sprintf('A.push_back(%0.15e);\n',A)
sprintf('d.push_back(%d);\n', zeros(n,1))
*/
4th-order Butterworth bandpass
300 Hz to 5000 Hz @ 48.8281250 kHz
Create with MATLAB like so.


4th - order Butterworth bandpass 300 Hz to 5000 Hz @ 48 . 8281250 kHz Create with MATLAB like so .
FilterButterBand_48k_300_5000::FilterButterBand_48k_300_5000()
{
	B.push_back(6.325743528801947e-02);
	B.push_back(0.000000000000000e+00);
	B.push_back(-1.265148705760389e-01);
	B.push_back(0.000000000000000e+00);
	B.push_back(6.325743528801947e-02);
	A.push_back(1.000000000000000e+00);
	A.push_back(-3.132874105110674e+00);
	A.push_back(3.707314974017143e+00);
	A.push_back(-2.000492567522976e+00);
	A.push_back(4.264766788841259e-01);
	d.push_back(0);
	d.push_back(0);
	d.push_back(0);
	d.push_back(0);
}
FilterButterBand_48k_300_5000 :: FilterButterBand_48k_300_5000 ( ) { B . push_back ( 6.325743528801947e-02 ) ; B . push_back ( 0.000000000000000e+00 ) ; B . push_back ( -1.265148705760389e-01 ) ; B . push_back ( 0.000000000000000e+00 ) ; B . push_back ( 6.325743528801947e-02 ) ; A . push_back ( 1.000000000000000e+00 ) ; A . push_back ( -3.132874105110674e+00 ) ; A . push_back ( 3.707314974017143e+00 ) ; A . push_back ( -2.000492567522976e+00 ) ; A . push_back ( 4.264766788841259e-01 ) ; d . push_back ( 0 ) ; d . push_back ( 0 ) ; d . push_back ( 0 ) ; d . push_back ( 0 ) ; }
4th-order Butterworth bandpass
300 Hz to 5000 Hz @ 48.8281250 kHz
Create with MATLAB like so:
4th - order Butterworth bandpass 300 Hz to 5000 Hz @ 48 . 8281250 kHz Create with MATLAB like so :