> OK, I understand you. The convolution formula is always the sameregardless of> what filter type you are using--low-pass, high-pass, band-pass,something> totally arbitrary, etc.. So your filtering function can always bethe same, but> depending on what filter coefficients you use, it may create a LP,HP, etc.. excellent, that really clears up a lot of uncertainties for me. Of all the documentation I've read nobody's just come out and said that. Jon and Jerry, thanks again for sharing your vast knowledge of DSP with me and all the other newbies.
FIR Filter Help
Started by ●February 13, 2005
Reply by ●February 16, 20052005-02-16
Reply by ●February 16, 20052005-02-16
"samseed" <agent3492003@yahoo.com> wrote in message news:1108601220.386364.169590@c13g2000cwb.googlegroups.com...> > OK, I understand you. The convolution formula is always the same > regardless of > > what filter type you are using--low-pass, high-pass, band-pass, > something > > totally arbitrary, etc.. So your filtering function can always be > the same, but > > depending on what filter coefficients you use, it may create a LP, > HP, etc.. > > excellent, that really clears up a lot of uncertainties for me. Of all > the documentation I've read nobody's just come out and said that.That's because it's so obvious for those of us who have been doing DSP for years! :-)> Jon and Jerry, thanks again for sharing your vast knowledge of DSP with > me and all the other newbies.You're welcome.
Reply by ●February 16, 20052005-02-16
samseed wrote: ...> Jon and Jerry, thanks again for sharing your vast knowledge of DSP with > me and all the other newbies.My pleasure! Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●February 17, 20052005-02-17
Jon Harris wrote:> Looks good to me! I still would use a loop for the convolution step so it is > easier to change number of taps, but that's just a programming preference.It's more than just a preference, it's good practice. But I think I see a problem with your implementation.>>for (int t=20; t < audioShortData.length; t++) { >>audioShortData[t] = (short)(( >>a0*audioShortData[t]+ >>a1*audioShortData[t-1]+...>>a20*audioShortData[t-20]You are overwriting your input data with your filter result. That means that the each pass through the filter loop gets a different set of data, and that is incorrect. You need to store your results somewhere else. Do have a look at the FIR code on dspguru. -- Jim Thomas Principal Applications Engineer Bittware, Inc jthomas@bittware.com http://www.bittware.com (603) 226-0404 x536 Quidquid latine dictum sit, altum sonatur. Whatever is said in Latin sounds profound.
Reply by ●February 17, 20052005-02-17