using resamples to make filters

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 Sep 28, 2008 at 01:41

I just had an idea, I was wondering if its been done and tested before.

if you take a sample, and resample it to half - then you lose half the frequencies because they are now above nyquist (theyve lost their compression or rarefaction.)

that will give you a low pass filter.

you shrink the sample set to lose the his- then you reenlarge it to keep it in the same time set.

then to get a high pass filter its the original sound minus the lows, and a
band pass is a lowpass filter and highpass filter combined.

so you could actually make a filter library out of resamples, and its actually not computationally expensive, and it
has instant reaction - and iir and fir filters take a few samples to kick in (the higher order they are the more they
woomph the sound in), so this is actually better in a way!

to get so theres no distortion, youd have to implement anti aliasing.

is this a valid way to make a filter?, or is it not accurate enough to work properly. and has it been done before?

6 Replies

Please log in or register to post a reply.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Sep 28, 2008 at 02:03

It’s definitely a valid way to make the filter. The question is how do you do the resampling.

If you do the resampling the “standard” way, by averaging, you’ve just implemented a box filter. It can be used to make high-pass, low-pass, and bandpass filters, but comes with the standard problems of box filters in that it’s a sinc filter in the frequency domain, and so you can get “ringing” due to the bits of high frequencies that are let through.

However, you can also resample using other filters, like Gaussians or cone filters.

In fact, trying to evaluate wide filters, like wide Gaussians for instance, is much faster if you first downsample the image a bit, then do the Gaussian, and then upsample. The results can look visually identical.

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 Sep 28, 2008 at 02:14

wow, i never thought of this.

do u think doing it this way, you could get a correct partial exactly (a single sinewave)

is there any place on the internet where they are using this method i could have a read?

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Sep 28, 2008 at 04:23

I’m sorry, I don’t know what you mean by a “correct partial”? Are you talking about a kind of filter?

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 Sep 28, 2008 at 11:23

a single sinewave.

anyway - i read on the internet and you can use am to close a chosen frequency to 1 hz by using a sine wave oscillating at it.

all frequencies above the sine wave dont make it to 1 hz and the sine waves below back flip at 0 hz.

so you need a low pass filter that can isolate 1 hz.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Sep 28, 2008 at 19:01

Can you give me a link? I’m sorry, I’m still not quite understanding what you’re talking about.

It sounds like you’re talking about a perfect low-pass filter, with an infinitely sharp falloff (all frequencies above the cutoff are perfectly attenuated, all frequencies below are perfectly undistorted)?

That would be a box filter in the frequency domain, which by the fourier transform would be equivalent to an (infinite-extent) sinc filter in the time domain.

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 Sep 29, 2008 at 05:14

im sorry if im confusing…

im trying to implement something like this->

http://www.panix.com/\~jens/pvoc-dolson.par

i want a filter with infinitely sharp falloff, yep.

sorry, i dont know what im talking about…