(8.D.2.6) CrossoverFilter
Overview
Multi-channel envelope detector with programmable attack and release times
Discussion
This subsystem implements N-way crossover filters of either Linkwitz-Riley or Butterworth design. Internally, the crossovers are constructed out of two other subsystems: a 1in-2out crossover which divides the input into two separate frequency bands and an allpass phase compensation network. The 1in-2out crossover consists of lowpass (first output) and highpass (second output) filters. The lowpass and highpass filters are designed such that the sum of their responses equals an allpass filter with unity gain - and this allpass response equals the response of the allphase phase compensation network. An N-way crossover is constructed by cascading these subsystems.
In the final subsystem, the first output pin (the top pin in Audio Weaver Designer) is the lowest frequency band. Output pin 2 is the next higher frequency band and so on. The last output pin (the bottom one Audio Weaver Designer) is the highest frequency band.
The subsystem .className is generated using the crossover type, number of outputs, and order. For Linkwitz-Riley crossovers, the .className equals "LRXoverN%dOrder%d" where the first integer is the number of bands and the second integer is the order. Similarly, for Butterworth crossovers, the .className equals "ButterXoverN%dOrder%d" where the first integer is the number of bands and the second integer is the order.
The number of 1in-2out crossovers required to make an N-way crossover equals N-1. The number of allpass phase compensation filters grows as O(NxN), so beware, there may be quite a large number of filters! The table below shows the number of 1in-2out crossovers and the number of allpass filters as a function of N, the number of output channels.
N 1in-2out Allpass
2 1 0
3 2 1
4 3 3
5 4 6
6 5 10
See some of the example below for the topology of the crossover system.
In the Linkwitz-Rily design, the lowpass and highpass splitting filters are always 4th order. The splitting filters are each formed as a cascade of 2 second order Butterworth filters. The allpass compensating filter is 2nd order based on a Butterworth design.
In the Butterworth filter design, the lowpass and highpass filters are each standard Butterworth designs and the order must be odd. The odd order requirement ensures that the sum of the splitting filters is an allpass, and the allpass compensation filter equals the the sum of the splitting filters. The order of the allpass compensation filter matches the order of the splitting filters. Thus, 5th order splitting filters require a 5th order allpass network
Type Definition
-Not Shown-
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
cutoff | float* | parameter | 0 | [1 x 1] | 1:23997.6 | Hz |
N | int | const | 0 | 2 | Unrestricted | Â |
Pins
Input Pins
Name: in
Description: audio input
Data type: float
Channel range: Unrestricted
Block size range: Unrestricted
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out1
Description: Audio output
Data type: float
Â
Name: out2
Description: Audio output
Data type: float
Scratch Pins
Channel count: 1
Block size: 32
Sample rate: 48000
Â
Channel count: 1
Block size: 32
Sample rate: 48000
MATLAB Usage
File Name: xover_nway_subsystem.m
SYS=xover_nway_subsystem(NAME, N, ORDER, isHP)
Creates a subsystem that implements N-way crossovers of various types.
The module has a single input pin and N output pins. Each pin can
be multichannel. The subsystem divides the input signal into N
distinct frequency bands. The first band extends from DC to
cutoff(1) Hz; the second band extends from cutoff(1) to cutoff(2) Hz;
the last band extends from cutoff(N-1) to Nyquist. Arguments:
NAME - name of the subsystem
N - number of output bands. This should be in the range 2 to 12.
ORDER - order of each of each crossover filter.
An even ORDER will use the Linkwitz Riley design.
An odd ORDER will use the Butterworth filters.
isHP - use high-precision filter or regular filter
ORDER determines what type of crossover is used. If the ORDER is even, a
Linkwitz Riley crossover design will be used. If the ORDER is odd, a
Butterworth filter design si used.
The function returns a subsystem that implements the crossover. The
subsystem's input pin is named '.in' and the outputs are named
'.out1', '.out2', etc.
07/07/2014 - added isHP option. For the option of using high
precision filters instead
Â