librosa.filters._multirate_fb¶
-
librosa.filters.
_multirate_fb
(center_freqs=None, sample_rates=None, Q=25.0, passband_ripple=1, stopband_attenuation=50, ftype=’ellip’)[source]¶ Helper function to construct a multirate filterbank.
A filter bank consists of multiple band-pass filters which divide the input signal into subbands. In the case of a multirate filter bank, the band-pass filters operate with resampled versions of the input signal, e.g. to keep the length of a filter constant while shifting its center frequency.
This implementation uses
scipy.signal.iirdesign
to design the filters.Parameters: - center_freqs : np.ndarray [shape=(n,), dtype=float]
Center frequencies of the filter kernels. Also defines the number of filters in the filterbank.
- sample_rates : np.ndarray [shape=(n,), dtype=float]
Samplerate for each filter (used for multirate filterbank).
- Q : float
Q factor (influences the filter bandwith).
- passband_ripple : float
The maximum loss in the passband (dB) See
scipy.signal.iirdesign
for details.- stopband_attenuation : float
The minimum attenuation in the stopband (dB) See
scipy.signal.iirdesign
for details.- ftype : str
The type of IIR filter to design See
scipy.signal.iirdesign
for details.
Returns: - filterbank : list [shape=(n,), dtype=float]
Each list entry comprises the filter coefficients for a single filter.
- sample_rates : np.ndarray [shape=(n,), dtype=float]
Samplerate for each filter.
Raises: - ParameterError
If center_freqs is None. If sample_rates is None. If center_freqs.shape does not match sample_rates.shape.
See also
Notes
This function caches at level 10.