Bandpass/Crossover/Bandwidth/"Brick Wall"

Adam Kendall's icon

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

Leafcutter John's icon

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

Trond Lossius's icon

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

Best,
Trond

Max Patch
Copy patch and select New From Clipboard in Max.

Henry Till's icon

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.

and specifically,

-Henry

Adam Kendall's icon

Thanks for the advice, and thanks for the patch.

Adam

Adam Kendall's icon

I'll take a look at it, thanks.

Adam

Leafcutter John's icon

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.

Adam Kendall's icon

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

Adam

Trond Lossius's icon

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

Adam Kendall's icon

That's great, thanks.

Adam

Stefan Tiedje's icon

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

Max Patch
Copy patch and select New From Clipboard in Max.

--

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

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

Adam Kendall's icon

Thanks, I will check this out.

Adam

Roman Thilenius's icon

> > 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

Adam Kendall's icon

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

Adam Kendall's icon

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