Forums > MaxMSP

Filter: Allow a certain range of frequencies to pass (precise)?

May 20, 2009 | 7:49 pm

I want to isolated certain ranges of frequencies…Right now I am using a bandpass filtergraph into biquad, but I want it to be exact. I want to be able to specify EXACT bands to let through, not just roughly do it with the bandpass.

e.g.

1) Only let 0-200 Hz, send somewhere in patch

2) Only let 200-600 Hz, send somewhere else in patch

3) etc…

Any ideas?


May 20, 2009 | 7:54 pm

I don’t know of a filter that is that precise. Filters–even the steepest ones–all have a bit of a slope to them. Thus, I don’t believe the ability to say up to 200Hz go this way, and 201Hz and above go that way is possible.


May 20, 2009 | 8:04 pm

try stacking biquads for a steeper slope. But there really is no such thing as a filter without some kind of slope.


May 20, 2009 | 8:20 pm

Alrighty, guess I have to do it the hard way.

Was hoping there was something like Ableton’s EQ3, which lets you specify 3 zones of frequencies exactly.


May 20, 2009 | 8:24 pm

I could be wrong–I don’t have Ableton–but I bet if you did an actual FFT analysis on the output of that EQ, you would see that there is a fair amount of frequency bleed-through on either side of the cutoff.



jln
May 20, 2009 | 8:51 pm

Have a look at fffb~ which could help. You can also search the forum for "brick wall filter" or something. This particular thread can be of interest:

http://www.cycling74.com/forums/index.php?t=msg&goto=61745&rid=0&S=33215d4f79755d05384c2741ce6db142&srch=brickwall#msg_61745

hth,
Julien


May 20, 2009 | 9:27 pm

yea, as shepard stated, ableton’s EQ3 isn’t EXACT frequencies – that’s not really possible in DSP (or in analog processing for that matter). EQ3 is just meant to mimic the functionality of 3 band analog EQs you get on most mixers. Something similar could easily be built in MSP using 3 cascaded peaknotch filters.


May 21, 2009 | 7:51 am

as others have already said, there is no such thing as an infinitely steep filter. if you’re looking for good performance and phase-linearity is not an issue, you could go for a high ordered iir filter design like butterworth, chebyshev or elliptic.
otherwise fir filters can be realized in max with [buffir~].
using a sinc function as filter kernel one can obtain a very steep lowpass filter. there should be similar functions for highpass etc.

if you’re on a mac and feel like trying one of the mentioned iir filters, you could check out vb.cheby~ form this site
http://www.esbasel.ch/Downloads/MaxMSP-Objects.htm
which implements a high order chebyshev hi/lowpass filter.

vb



d.
August 6, 2009 | 8:37 pm

You could use the fiddle~ or pitch~ externals to detect exact frequencies.
If the output of fiddle~ was some number, the volume gets turned up, otherwise down.
That kind of thing.


August 7, 2009 | 12:16 am

could also use pfft and split up the ranges that way


August 7, 2009 | 10:36 am

forbidden-planet.maxpat in your max folder


August 7, 2009 | 7:38 pm

vb.cheby~ might the best choice to achieve this.


August 8, 2009 | 7:24 pm

One solution is a pair of crossover filters for each frequency range (one crossover on the bottom freq, the other on the top freq).

As others said, all filters have some kind of a curve — A crossover’s curve is so steep that it’s effectively a sonic "brick wall", though reality is some unwanted frequencies will get in. Bet you can’t hear them, though.

Here’s an example that uses the tl.crossover~ external.

It’s four nested patches. _ike.bandpass_demo.maxpat is the topmost patch. Open it first.

The display of the bpatchers may be messed up since I’m using presentation mode. Not sure if that info gets passed in compressed files.

_ike.bandpass_demo.maxpat

– Pasted Max Patch, click to expand. –

ike.bandpass_mono~.maxpat

– Pasted Max Patch, click to expand. –

ike.crossover_freq.maxpat

– Pasted Max Patch, click to expand. –

ike.line_flonum.maxpat

– Pasted Max Patch, click to expand. –

August 8, 2009 | 7:27 pm

"_ike.bandpass_demo.maxpat is the topmost patch. Open it first."

Actually, uncompress it last. Due to nesting, first uncompress and save the files in this order:

ike.line_flonum.maxpat
ike.crossover_freq.maxpat
ike.bandpass_mono~.maxpat
_ike.bandpass_demo.maxpat

Then, open _ike.bandpass_demo.maxpat to see how they’re put together.


December 24, 2012 | 12:10 pm

You can also try to use fft~ filters. Here you can find free spectral filter http://lowertone.net/software/freeq/


December 24, 2012 | 2:01 pm

the best solution I found to this problem/question (which was at the core of some music i did a few years ago) was using the GRM Tools bandpass filter (used the VST~ plugin inside max) – the steepest band pass I found, but which does not "push" the edges of the band (cascading biquads to filter say, 200-500 Hz range makes the actual border frequencies – 200 and 500 – way too proeminent.

hope it helps

kasper


Viewing 16 posts - 1 through 16 (of 16 total)