Design Mel Filter Bank
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
fb — Filter bank
column vector | matrix
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
, whereceil
(NFFT/2)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
fvec — Center frequencies
row vector
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
FFT length — Number of DFT points
1024
(default) | positive integer
Number of points used to calculate the DFT, specified as a positive integer.
Design one-sided filter bank — Design one-sided or two-sided filter bank
on
(default) | off
When you select this parameter, the block designs a one-sided filter bank. Otherwise, the filter bank is two sided.
Number of bands — Number of bandpass filters
32
(default) | positive integer
Number of bandpass filters, specified as a positive integer.
Auto-determine frequency range — Automatically determine frequency range
on
(default) | off
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 (Hz) — Frequency range over which to design filter bank
[0,22050]
(default) | two-element row vector
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.
Filter bank design domain — Domain to design filter bank
linear
(default) | warped
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.
Filter bank normalization — Normalization technique for filter bank
bandwidth
(default) | area
| none
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.
Mel style — Mel style
oshaughnessy
(default) | slaney
Style of the mel scale, specified as oshaughnessy
or
slaney
.
Output data type — Data type of output
double
(default) | single
Data type of output, specified as double
or
single
.
Sample rate (Hz) — Sample rate
44.1e3
(default) | positive scalar
Sample rate in Hz of the filter design, specified as a positive scalar.
Visualize filter bank — Open plot to visualize filter bank
button
Open plot to visualize the filters in the frequency domain.
Output center frequencies — Specify additional output port for center frequencies
off
(default) | on
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 |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Version History
Introduced in R2022aR2023b: Support for Slaney-style mel scale
Set the Mel style parameter to
slaney
to use the Slaney-style mel scale.
See Also
Blocks
Functions
Objects
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)