In one of my programs I used one bi-quad of high pass and 3 bi-quads of low pass. For the narrow band mode of CW, the bandwidth is split plus and minus from the center frequency of 700 hz. You can ignore the wv variable, this was a Weaver mode radio. I implemented a tone control by varying the Q of the lowpass filter sections - and that sort of works ok.
Code:
if( mode == CW ){
wv = 2500;
hp = ( bw > 1000 ) ? 200 : 700 - bw/2;
bw = ( bw > 1000 ) ? bw : 700 + bw/2 ;
}
else if( mode == AM || mode == DIGI ) wv = 6000, hp = 100; // for digi mode, set weaver hole at 3k hz
else hp = 200, wv = 4000; // SSB
BandWidth.setHighpass(0,hp,0.70710678);
BandWidth.setLowpass(1,bw,0.51763809 + tone_);
BandWidth.setLowpass(2,bw,0.70710678 + tone_);
BandWidth.setLowpass(3,bw,1.9318517 + tone_/2);
Actually I found I did use a bandpass section in another program. The Q value used was most likely found by trial. ( And it looks like my other Q's are incorrect, I probably wrote this program before I found the online calculator linked above )
Code:
if( mode_menu_data.current == 1 ){ // cw/hell modes, change last to bandpass response
BandWidth.setLowpass(0,sel,0.67);
BandWidth.setLowpass(1,sel,1.10);
BandWidth.setLowpass(2,sel,0.707);
BandWidth.setBandpass(3,700,2.5);
}