# Weighting Filter

Weighted frequency response filter

• Library:
• Audio Toolbox / Filters

## Description

The Weighting Filter block performs frequency-weighted filtering independently across each input channel.

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

Data Types: `single` | `double`

### Output

expand all

The Weighting Filter block outputs a signal with the same data type as the input signal. The size of the output depends on the size of the input:

• Matrix input –– The block outputs a matrix the same size and data type as the input signal.

• 1-D vector input –– The block outputs an N-by-1 matrix (column vector), where N is the number of elements in the 1-D vector.

Data Types: `single` | `double`

## Parameters

expand all

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

See A-Weighting, C-Weighting, and K-Weighting for the definition of the weighting curves.

Tunable: No

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

Tunable: Yes

#### Dependencies

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

• `Code generation` –– Simulate 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 faster than ```Interpreted execution```.

• `Interpreted execution` –– Simulate model using the MATLAB® interpreter. This option shortens startup time but has a slower simulation speed compared to ```Code generation```. In this mode, you can debug the source code of the block.

Tunable: No

The mask attenuation limits are defined in the IEC 61672-1:2002 standard.

• If the mask is green, the design is compliant.

• If the mask is red, the design breaks compliance.

Tunable: Yes

#### Dependencies

To enable this parameter, set Weighting method to `A-weighting` or `C-weighting`.

A 2048-point FFT is used to calculate the magnitude response.

Tunable: Yes

## Block Characteristics

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

expand all

## References

[1] Acoustical Society of America. Design Response of Weighting Networks for Acoustical Measurements. ANSI S1.42-2001. New York, NY: American National Standards Institute, 2001.

[2] International Electrotechnical Commission. Electroacoustics Sound Level Meters Part 1: Specifications. First Edition. IEC 61672-1. 2002-2005.

[3] International Telecommunication Union. Algorithms to measure audio programme loudness and true-peak audio level. ITU-R BS.1770-4. 2015.

[4] Mansbridge, Stuart, Saoirse Finn, and Joshua D. Reiss. "Implementation and Evaluation of Autonomous Multi-track Fader Control." Paper presented at the 132nd Audio Engineering Society Convention, Budapest, Hungary, 2012.