# Crossover Filter

Audio crossover filter

• Library:
• Audio Toolbox / Filters

## Description

The Crossover Filter block implements an audio crossover filter, which is used to split an audio signal into two or more frequency bands. Crossover filters are multiband filters whose overall magnitude frequency response is flat.

## Ports

### Input

expand all

• Matrix input –– Each column of the input is treated as an independent channel.

• 1-D vector input –– The input is treated as a single channel.

This port is unnamed unless you specify additional input ports.

Data Types: `single` | `double`

#### Dependencies

To enable this port, select Specify from input port for the Crossover frequency (Hz) parameter.

Data Types: `single` | `double`

#### Dependencies

To enable this port, select Specify from input port for the Crossover order parameter.

Data Types: `single` | `double`

#### Dependencies

To enable this port, you need to both:

Data Types: `single` | `double`

#### Dependencies

To enable this port, you need to both:

Data Types: `single` | `double`

#### Dependencies

To enable this port, you need to both:

Data Types: `single` | `double`

#### Dependencies

To enable this port, you need to both:

Data Types: `single` | `double`

#### Dependencies

To enable this port, you need to both:

Data Types: `single` | `double`

#### Dependencies

To enable this port, you need to both:

Data Types: `single` | `double`

### Output

expand all

Port Y1 always corresponds to a lowpass filter.

#### Dependencies

Available if Number of crossovers is set to `1`, `2`, `3`, or `4`.

Data Types: `single` | `double`

Depending on the number of crossovers specified, port Y2 outputs the original audio signal passed through a bandpass or highpass filter.

#### Dependencies

Available if Number of crossovers is set to `1`, `2`, `3`, or `4`.

Data Types: `single` | `double`

Depending on the number of crossovers specified, port Y3 corresponds to a bandpass or highpass filter of the original audio signal.

#### Dependencies

Available if Number of crossovers is set to `2`, `3`, or `4`.

Data Types: `single` | `double`

#### Dependencies

Available if Number of crossovers is set to `3` or `4`.

Data Types: `single` | `double`

#### Dependencies

Available if Number of crossovers is set to `4`.

Data Types: `single` | `double`

## Parameters

expand all

If a parameter is listed as tunable, then you can change its value during simulation.

If you specify multiple crossovers, the corresponding Crossover frequency (Hz) and Crossover order parameters populate in the dialog box automatically.

The number of bands output by the Crossover Filter block is one more than the Number of crossovers.

Number of CrossoversNumber of Bands in Output
`1`Two
`2`Three
`3`Four
`4`Five

Crossover frequencies are the intersections of magnitude response bands of the individual two-band crossover filters used in the multiband crossover filter.

Tunable: Yes

The crossover filter order relates to the crossover filter slope in dB/octave: $slope=N×6,$ where N is the crossover order.

Tunable: Yes

The plot is updated automatically when parameters of the Crossover Filter block change.

Tunable: Yes

Name of the variable in the base workspace to contain the filter when it is exported. The name must be a valid MATLAB® variable name.

When you select this parameter, exporting the filter overwrites the variable specified by the Variable name parameter if it already exists in the base workspace. If you do not select this parameter and the specified variable already exists in the workspace, exporting the filter creates a new variable with an underscore and a number appended to the variable name. For example, if the variable name is `var` and it already exists, the exported variable will be named `var_1`.

Export the filter to the base workspace in the variable specified by the Variable name parameter.

#### Tips

• You cannot export the filter if you have enabled the Inherit sample rate from input parameter and the model is not running.

• You cannot export the filter if you are specifying filter characteristics from input ports.

When you select this parameter, the block inherits its sample rate from the input signal. When you clear this parameter, you specify the sample rate in Input sample rate (Hz).

Tunable: Yes

#### Dependencies

To enable this parameter, clear the Inherit sample rate from input parameter.

• `Interpreted execution` – Simulate the model using the MATLAB interpreter. This option reduces startup time and the simulation speed is comparable to ```Code generation```. In this mode, you can debug the source code of the block.

• `Code generation` – Simulate the model using generated C code. The first time you run a simulation, Simulink® generates C code for the block. The C code is reused for subsequent simulations, as long as the model does not change. This option requires additional startup time, but the speed of the subsequent simulations is comparable to ```Interpreted execution```.

Tunable: No

## Block Characteristics

 Data Types `double` | `single` Direct Feedthrough `no` Multidimensional Signals `no` Variable-Size Signals `yes` Zero-Crossing Detection `no`

## Algorithms

expand all

The Crossover Filter block is implemented as a binary tree of crossover pairs with additional phase-compensating sections [1]. Odd-order crossovers are implemented with Butterworth filters, while even-order crossovers are implemented with cascaded Butterworth filters (Linkwitz-Riley filters).

## References

[1] D’Appolito, Joseph A. "Active Realization of Multiway All-Pass Crossover Systems." Journal of Audio Engineering Society. Vol. 35, Issue 4, 1987, pp. 239–245.

## Version History

Introduced in R2016a