Forums > MaxMSP

Bandpass/Crossover/Bandwidth/"Brick Wall"

January 28, 2006 | 3:09 am

Been checking the archives and would like to confirm the info I found.

I need a solution for a patch I’m writing.

The goal is — Split a full-spectrum signal into 4 separate hi/low frequency
ranges.

Basically, I need 4 bandpass filters where I can control the bandwidth or I
need 4 pairs of crossovers.

Whatever solution I go with, I’m looking for a "brick wall" slope or as
close as I can get.

By searching the archives, it seems the solution involves cascading biquad~
or something similar. Found an example (message #16840).

Other solutions discuss using Lossius’ tl.butter* externals.

Questions:

1. These posts are old. Has a more literal external been developed, like a
signal version of [split]?

2. Using either the tl externals or biquad~, am I missing how to create a
bandpass filter that has a bandwith control? i.e., a "flat-top" of defined
width? Is it possible? Or is the solution a high-pass and low-pass in
series?

I saw posts talking about using a series of bandpasses on different
frequencies to approximate this. Is it the only way?

3. Out of curiousity, what’s the standard Q/slope of an analog crossover,
like one used to split a signal between a subwoofer and regular speakers.
Is it a brick wall or close? Does it have a longer slope?

Thanks.

Adam


January 28, 2006 | 3:30 am

Have you looked at fffb~ I think this will do what you want – it’a a standard max object which apears in the MSP filters section of the new object menu.

best,

john


January 28, 2006 | 2:00 pm

You’ve got two possibilities, IIR filters, or FFT-based techniques as
suggested by John. It all depends on what you want. With filters,
you have to find filters that are suiting to your needs.

Butterworth filters have as flat a response in their passband region
as you can possible get (no resonating frequency), but they have
phase offsets at various frequencies that for some uses might
represent a problem.

Last fall I made a fourth order Linkwitz-Riley filter
(tl.crossover4~). This is a high or low-pass filter with flat pass-
band response, -24dB per octave roll-off and in addition the phase
offset for frequencies are the same for the high and low pass
filters. If you want a flat bandpass region you can combine several
of these.

Loudspeakers etc. often use 4th order Linkwitz_Riley filters for
splitting between the various frequencies.

> I saw posts talking about using a series of bandpasses on different
> frequencies to approximate this. Is it the only way?

Yes, this is a common way of doing it. The challenge is to keep the
various ranges in-phase (for instance if high and low is to be routed
to a sub and a tweeter), so that you don’t get phase cancellations in
the cross-over region.

> 3. Out of curiousity, what’s the standard Q/slope of an analog
> crossover,
> like one used to split a signal between a subwoofer and regular
> speakers.
> Is it a brick wall or close? Does it have a longer slope?

Good ones are 24 dB roll-off per octave.

Here’s a patch that migh be of help. tl.crossover4~ can be fount at

http://www.bek.no/~lossius/download

Best,
Trond

#P window setfont "Sans Serif" 9.;
#P flonum 308 91 51 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 252 91 51 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user ezdac~ 388 91 432 124 0;
#P user spectroscope~ 142 254 306 309 20 0 1 2 1 1 0 1 0 0 0 0;
#X frgb 224 224 224;
#X brgb 255 255 255;
#X rgb2 0 0 0;
#X rgb3 243 204 204;
#X rgb4 255 0 0;
#X rgb5 184 184 184;
#X rgb6 0 0 0;
#X rgb7 0 0 0;
#X rgb8 255 255 255;
#X rgb9 255 0 0;
#X rgb10 255 191 0;
#X rgb11 0 191 127;
#X rgb12 127 0 127;
#X rgb13 0 0 0;
#X range 0. 1.2;
#X domain 0. 22050.;
#X done;
#P window linecount 1;
#P newex 142 200 124 196617 tl.crossover4~ low 4000;
#P newex 142 168 120 196617 tl.crossover4~ high 300;
#P newex 142 91 34 196617 pink~;
#P connect 6 0 2 1;
#P connect 5 0 1 1;
#P connect 1 0 2 0;
#P connect 0 0 1 0;
#P connect 2 0 3 0;
#P window clipboard copycount 7;


January 28, 2006 | 4:46 pm

Just wanted to add that the Rane Corporation has a great general
reference section on their website with lots of tech notes about
signal processing, studio interconnection, and much more (including a
surprisingly useful pro audio glossary).

Amidst their tech notes is section with a couple PDFs on crossover
design, which may or may not be of use to you, Adam.

http://www.rane.com/library.html#rnotes

and specifically,

http://www.rane.com/note160.html

-Henry


January 28, 2006 | 8:00 pm

Thanks for the advice, and thanks for the patch.

Adam


January 28, 2006 | 8:00 pm

I’ll take a look at it, thanks.

Adam


January 28, 2006 | 10:02 pm

Trond,

I just downloaded your objects and abstractions and i just wanted to say thank you for making them public. The filters are lovely and your work shows some lovely sparks of ingenuity!

I could not open the ‘tl.crossover4~’ help patch from the object tl.objects_overview patch though all the others worked fine. This could be due to me using an old machine. I will investigate this on my main machine when i get chance.

best,

john.


January 28, 2006 | 10:10 pm

Yeah, Trond, I should say thank you also. The tl.crossover4 is just what
I’m looking for.

Adam


January 29, 2006 | 12:16 pm

Thanks for the kind words. I believe there’s a patch chord missing in
the help file that makes it not opening tl.crossover4~.help. I’ll fix
that as soon as I get the time. The tl.crossover4~ help file should
be present in the distro, though.

If you want to do it yourself locally in the meantime, look for
"tl.objects abstractions/tl.lib/tl.objects_list.pat" The right outlet
of the tl.crossover~ umenu should be connected to prepend the same
way as the rest of them are.

Best,
Trond


January 29, 2006 | 2:36 pm

That’s great, thanks.

Adam


January 30, 2006 | 1:21 pm

Adam Kendall wrote:
> The goal is — Split a full-spectrum signal into 4 separate hi/low frequency
> ranges.
>
> Basically, I need 4 bandpass filters where I can control the bandwidth or I
> need 4 pairs of crossovers.
>
> Whatever solution I go with, I’m looking for a "brick wall" slope or as
> close as I can get.

The patch below is a fft based brickwall. The higher the fft frame size
the steeper the filter and the slower the response….

Stefan

#P window setfont "Sans Serif" 9.;
#P number 225 123 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 179 123 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 133 123 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P comment 252 151 224 196617 < - then reinstantiate this or reload the
patcher.;
#N vpatcher 10 59 490 362;
#P window setfont "Sans Serif" 9.;
#N vpatcher 30 89 375 288;
#P outlet 293 131 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P message 210 111 81 196617 $3;
#P message 127 111 81 196617 $2;
#P message 44 111 81 196617 $1;
#P newex 44 89 259 196617 t b b b f;
#P newex 44 45 50 196617 buddy;
#P window linecount 1;
#P newex 44 67 50 196617 / 1.;
#P newex 30 23 52 196617 dspstate~;
#P newex 84 23 79 196617 fftinfo~;
#P outlet 210 131 15 0;
#P outlet 127 131 15 0;
#P outlet 44 131 15 0;
#P connect 4 1 6 0;
#P connect 6 0 5 0;
#P connect 5 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 0 0;
#P connect 3 0 6 1;
#P connect 6 1 5 1;
#P connect 7 1 9 0;
#P connect 9 0 1 0;
#P connect 7 2 10 0;
#P connect 10 0 2 0;
#P connect 7 3 11 0;
#P pop;
#P newobj 279 52 100 196617 p args;
#P newex 331 78 28 196617 / 1.;
#N in 4;
#P newobj 331 31 28 196617 in 4;
#P newex 301 78 28 196617 / 1.;
#N in 3;
#P newobj 301 31 28 196617 in 3;
#P newex 271 78 28 196617 / 1.;
#N in 2;
#P newobj 271 31 28 196617 in 2;
#P newex 61 136 33 196617 +~ 1;
#P newex 313 107 28 196617 >~;
#P newex 283 107 28 196617 >~;
#P newex 253 107 28 196617 >~;
#P newex 61 161 163 196617 gate~ 4;
#P newex 175 203 49 196617 fftout~ 4;
#P newex 124 203 49 196617 fftout~ 3;
#P newex 73 203 49 196617 fftout~ 2;
#P newex 22 182 163 196617 gate~ 4;
#P newex 22 203 49 196617 fftout~ 1;
#P newex 175 31 88 196617 fftin~ 1;
#P comment 261 156 100 196617 save me !;
#P fasten 11 0 3 0 66 157 27 157;
#P connect 3 0 2 0;
#P fasten 9 0 11 0 288 130 66 130;
#P fasten 10 0 11 0 318 130 66 130;
#P fasten 8 0 11 0 258 130 66 130;
#P connect 11 0 7 0;
#P connect 7 0 2 1;
#P connect 3 1 4 0;
#P connect 7 1 4 1;
#P connect 3 2 5 0;
#P connect 7 2 5 1;
#P connect 1 0 3 1;
#P connect 3 3 6 0;
#P connect 1 1 7 1;
#P connect 7 3 6 1;
#P connect 1 2 8 0;
#P connect 12 0 13 0;
#P connect 18 0 13 0;
#P connect 13 0 8 1;
#P fasten 1 2 9 0 258 100 288 100;
#P fasten 18 3 13 1 374 73 294 73;
#P connect 14 0 15 0;
#P connect 18 1 15 0;
#P connect 15 0 9 1;
#P fasten 1 2 10 0 258 100 318 100;
#P fasten 18 3 15 1 374 73 324 73;
#P connect 16 0 17 0;
#P connect 18 2 17 0;
#P connect 17 0 10 1;
#P fasten 18 3 17 1 374 73 354 73;
#P pop 1;
#P newobj 234 64 84 196617 p BrickCross4~;
#P user meter~ 300 288 380 301 50 0 168 0 103 103 103 255 153 0 255 0 0
217 217 0 153 186 0 12 3 3 3 3;
#P user meter~ 217 288 297 301 50 0 168 0 103 103 103 255 153 0 255 0 0
217 217 0 153 186 0 12 3 3 3 3;
#P user meter~ 134 288 214 301 50 0 168 0 103 103 103 255 153 0 255 0 0
217 217 0 153 186 0 12 3 3 3 3;
#P user meter~ 51 288 131 301 50 0 168 0 103 103 103 255 153 0 255 0 0
217 217 0 153 186 0 12 3 3 3 3;
#P number 87 70 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 87 103 41 196617 cycle~;
#P user ezdac~ 87 228 131 261 0;
#P window linecount 2;
#P newex 87 144 148 196617 pfft~ BrickCross4~ 4096 4 args 300 600 900;
#P window linecount 1;
#P comment 327 66 114 196617 < - open and save this;
#P comment 133 103 115 196617 crossover frequencies;
#P connect 14 0 2 3;
#P connect 13 0 2 2;
#P connect 12 0 2 1;
#P connect 2 0 6 0;
#P connect 5 0 4 0;
#P connect 4 0 2 0;
#P connect 2 2 3 0;
#P connect 2 0 3 0;
#P connect 2 3 3 1;
#P connect 2 1 3 1;
#P connect 2 1 7 0;
#P connect 2 2 8 0;
#P connect 2 3 9 0;
#P window clipboard copycount 15;

[][] [][][] [][] [][][] [][] [][][] [][] [][][]
[][][][][][][][][][][][][][][][][][][][][][][][][][][][]

Stefan Tiedje
Klanggestalter
Electronic Composition
&
Improvisation

/~~~~~
\ /|() ()|
))))) )| | |( \
/// _/)/ )))))
___/ ///

————————-x—
–_____———–|———-
–(_|_ —-|—–|—–()—
– _|_)—-|—–()———-
———-()————x—-

14, Av. Pr. Franklin Roosevelt, 94320 Thiais, France
Phone at CCMIX +33-1-49 77 51 72


January 30, 2006 | 1:38 pm

Thanks, I will check this out.

Adam


January 31, 2006 | 12:24 am

> > 2. Using either the tl externals or biquad~, am I missing how to
> > create a
> > bandpass filter that has a bandwith control? i.e., a "flat-top" of
> > defined
> > width? Is it possible? Or is the solution a high-pass and low-
> > pass in
> > series?

> You’ve got two possibilities, IIR filters, or FFT-based techniques as
> suggested by John.

you could do something like it with biquad or sfv, you
wont have "true" slope control with them, but bandwith
control is no problem.

if you want it phaselinear, IIR and FFT suck, FIR is the way
to go for this (buffir + hilbert).

like others aready said, it always depends on your needs.

lets make up a scenario:
you want to split audio into 2 frequency bands in order to
delay the high freqeuncies.
polarity would not matter here – so you could make a lowpass
by cascading 16 onepoles or biquads, and create your highpass
output then by substracting the input signal from the lowpass
oputput.
this is also the recommended way for everything where signal
power should be preserved as accurate as possible, maybe for
metering or analysis in a dynamic effect.

i usually prefer to cascade lowpasses to make "bandpasses"
over using sfv, because it is simply more flexible, you can
set the low and high points yourself similar to a full
parametric eq device.

-110Hz


January 31, 2006 | 12:47 am

Thanks for the info. Phase isn’t a concern for this project. 4 musicians
will use the same sample in a performance controlled by my patch. Part of
the game is to band-pass the 4 inputs to my system into 4 discrete frequency
ranges. They’re not going to be synced, so the phase relationship doesn’t
matter.

I keep meaning to study the theory and execution of all kinds of filters.
I’ve been working with audio equipment my whole life, including some really
nice high-end recording gear, and it wasn’t until I started with MSP that I
understood how complex a filter is.

Adam


February 1, 2006 | 1:45 pm

Sorry for the OT. This is a problem with my MOTU XP, not MSP, but am hoping
someone has been through this.

I’ve had my MOTU 828 (original version) for many years. Been using it on a
Mac (os9 and osX) no problems.

I now need to use it on an XP machine.

I installed the latest drivers from the MOTU website.

I can only access two channels at a time. In "Sounds and Audio Devices"
control panel and within Max/MSP, my options are limited to selecting a
stereo pair of output and input channels, I don’t see any way to access all
8 analog or all 10 analog/spidf at one time. e.g., I get droplists allowing
me to choose channels 1/2 *or* 3/4 *or* 5/6, etc., but not more than two
channels at a time.

Anyone know how I can access all 8 analog or all 10 analog/spdif channels at
once?

Thanks.

Adam


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