src/filter.cpp
FilterButterBand_48k_300_3000::FilterButterBand_48k_300_3000()
{
	B.push_back(2.407831141866356e-02);
	B.push_back(0.000000000000000e+00);
	B.push_back(-4.815662283732711e-02);
	B.push_back(0.000000000000000e+00);
	B.push_back(2.407831141866356e-02);
	A.push_back(1.000000000000000e+00);
	A.push_back(-3.489171356605181e+00);
	A.push_back(4.596268806387709e+00);
	A.push_back(-2.718834913978086e+00);
	A.push_back(6.119142234464546e-01);
	d.push_back(0);
	d.push_back(0);
	d.push_back(0);
	d.push_back(0);
}
// 4th-order Butterworth bandpass
// 300 Hz to 3000 Hz @ 48.8281250 kHz
// Create with MATLAB like so:
/*
n = 4; % filter order
sr = 48828.1250;
Wn = [300 3000] * 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 3000 Hz @ 48.8281250 kHz
Create with MATLAB like so.


4th - order Butterworth bandpass 300 Hz to 3000 Hz @ 48 . 8281250 kHz Create with MATLAB like so .
FilterButterBand_48k_300_3000::FilterButterBand_48k_300_3000()
{
	B.push_back(2.407831141866356e-02);
	B.push_back(0.000000000000000e+00);
	B.push_back(-4.815662283732711e-02);
	B.push_back(0.000000000000000e+00);
	B.push_back(2.407831141866356e-02);
	A.push_back(1.000000000000000e+00);
	A.push_back(-3.489171356605181e+00);
	A.push_back(4.596268806387709e+00);
	A.push_back(-2.718834913978086e+00);
	A.push_back(6.119142234464546e-01);
	d.push_back(0);
	d.push_back(0);
	d.push_back(0);
	d.push_back(0);
}
FilterButterBand_48k_300_3000 :: FilterButterBand_48k_300_3000 ( ) { B . push_back ( 2.407831141866356e-02 ) ; B . push_back ( 0.000000000000000e+00 ) ; B . push_back ( -4.815662283732711e-02 ) ; B . push_back ( 0.000000000000000e+00 ) ; B . push_back ( 2.407831141866356e-02 ) ; A . push_back ( 1.000000000000000e+00 ) ; A . push_back ( -3.489171356605181e+00 ) ; A . push_back ( 4.596268806387709e+00 ) ; A . push_back ( -2.718834913978086e+00 ) ; A . push_back ( 6.119142234464546e-01 ) ; d . push_back ( 0 ) ; d . push_back ( 0 ) ; d . push_back ( 0 ) ; d . push_back ( 0 ) ; }
4th-order Butterworth bandpass
300 Hz to 3000 Hz @ 48.8281250 kHz
Create with MATLAB like so:
4th - order Butterworth bandpass 300 Hz to 3000 Hz @ 48 . 8281250 kHz Create with MATLAB like so :