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

May 20, 2009 at 7:49pm

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

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?

#44013
May 20, 2009 at 7:54pm

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.

#158090
May 20, 2009 at 8:04pm

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

#158091
May 20, 2009 at 8:20pm

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.

#158092
May 20, 2009 at 8:24pm

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.

#158093
May 20, 2009 at 8:51pm

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

#158094
May 20, 2009 at 9:27pm

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.

#158095
May 21, 2009 at 7:51am

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

#158096
Aug 6, 2009 at 8:37pm

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.

#158097
Aug 7, 2009 at 12:16am

could also use pfft and split up the ranges that way

#158098
Aug 7, 2009 at 10:36am

forbidden-planet.maxpat in your max folder

#158099
Aug 7, 2009 at 7:38pm

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

#158100
Aug 8, 2009 at 7:24pm

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. –
#158101
Aug 8, 2009 at 7:27pm

“_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.

#158102
Dec 24, 2012 at 12:10pm

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

#158103
Dec 24, 2012 at 2:01pm

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

#158104

You must be logged in to reply to this topic.