I'm not an engineer so I hope I'm using the correct terminology here. I have a recorded waveform that I want to apply low and high pass filters too, are tehre already R functions existing to do this or am I going to have to program my own? thanks for any pointers tom
You should probably have a look at the sound packages for R, "tuneR" and "sound", I believe, on http://cran.r-project.org. Applying a filter can be done with filter(), but you need to come up with filter coefficients. "High-pass" and "low-pass" have simple descriptions in the Fourier transform space, so you might want to specify the frequency response of your filter directly there, then do an inverse Fourier transform (fft() in R) to get coefficients. The ingredients are all there in R itself; but the packages tuneR and sound might have exactly what you want. A book on time series or signal processing might be helpful. Reid Huntsinger -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of tom wright Sent: Monday, September 19, 2005 10:36 AM To: R-help mailing list Subject: [R] waveform filtering I'm not an engineer so I hope I'm using the correct terminology here. I have a recorded waveform that I want to apply low and high pass filters too, are tehre already R functions existing to do this or am I going to have to program my own? thanks for any pointers tom ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
On Mon, 2005-19-09 at 10:36 -0400, tom wright wrote:> I'm not an engineer so I hope I'm using the correct terminology here. I > have a recorded waveform that I want to apply low and high pass filters > too, are tehre already R functions existing to do this or am I going to > have to program my own? > thanks for any pointers > tom >Thanks for the answers to this, after a little reading I realised that what sounded so simple wasnt quite. However chapters 15-18 of http://www.dspguide.com has been very useful.
fftw is a library to do FFTs (fast Fourier transform). It's excellent, but probably not necessary unless you have lots of long series and you use FFT's repeatedly (say in an iterative fitting procedure). R's fft() is essentially instantaneous for most one-shot applications. Reid Huntsinger -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of jfontain at free.fr Sent: Tuesday, September 20, 2005 10:32 AM To: R-help mailing list Subject: Re: [R] waveform filtering Quoting tom wright <tom at maladmin.com>:> On Mon, 2005-19-09 at 10:36 -0400, tom wright wrote: > > I'm not an engineer so I hope I'm using the correct terminology here. I > > have a recorded waveform that I want to apply low and high pass filters > > too, are tehre already R functions existing to do this or am I going to > > have to program my own? > > thanks for any pointers > > tom > > > Thanks for the answers to this, after a little reading I realised that > what sounded so simple wasnt quite. However chapters 15-18 of > http://www.dspguide.com has been very useful.Maybe you need a more specialized tool, such as FFTW? I found it by searching on "fourier" at www.freshmeat.net. Just an idea... -- Jean-Luc ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html