Main Content

Design Mel Filter Bank

Design frequency-domain mel filter bank

Since R2022a

  • Design Mel Filter Bank block

Libraries:
Audio Toolbox / Features

Description

The Design Mel Filter Bank block outputs a frequency-domain auditory filter bank using the mel frequency scale. You can use a mel filter bank to decompose an audio signal into separate frequency bands in the mel frequency scale, which mimics the nonlinear human perception of sound.

Examples

Ports

Output

expand all

Mel filter bank, returned as an M-by-N matrix, where:

  • M is the number of bands, which is determined by the Auto-determine number of bands and Number of bands parameters.

  • N is the number of points in the spectrum. If you select Design one-sided filter bank, then N is equal to ceil(NFFT/2), where NFFT is the FFT length. If you do not select Design one-sided filter bank, then N is equal to the FFT length.

This port is unnamed until you select the Output center frequencies parameter.

Data Types: single | double

Center frequencies of the bandpass filters in Hz, returned as a row vector with number of elements equal to the number of bands.

Dependencies

To enable this port, select the Output center frequencies parameter.

Data Types: single | double

Parameters

expand all

Number of points used to calculate the DFT, specified as a positive integer.

When you select this parameter, the block designs a one-sided filter bank. Otherwise, the filter bank is two sided.

Number of bandpass filters, specified as a positive integer.

When you select this parameter, the block sets the Frequency range to [0,fs/2], where fs is specified using Sample rate (Hz).

Frequency range in Hz over which to design the filter bank, specified as a two-element row vector.

Dependencies

To enable this parameter, clear the Auto-determine frequency range parameter.

Domain in which the block designs the filter bank, specified as linear or warped. Set the filter bank design domain to linear to design the bandpass filters in the linear (Hz) domain. Set the filter bank design domain to warped to design the bandpass filters in the warped (mel) domain.

Normalization technique used for the filter bank weights, specified as bandwidth, area, or none.

  • bandwidth –– Normalize the weights of each bandpass filter by the corresponding bandwidth of the filter.

  • area –– Normalize the weights of each bandpass filter by the corresponding area of the bandpass filter.

  • none –– The block does not normalize the weights of the filters.

Style of the mel scale, specified as oshaughnessy or slaney.

Data type of output, specified as double or single.

Sample rate in Hz of the filter design, specified as a positive scalar.

Open plot to visualize the filters in the frequency domain.

When you select this parameter, the block displays an additional output port, fvec. This port outputs the center frequencies of the bandpass filters.

Block Characteristics

Data Types

double | single

Direct Feedthrough

no

Multidimensional Signals

no

Variable-Size Signals

no

Zero-Crossing Detection

no

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2022a

expand all