Caution

You're reading an old version of this documentation. If you want up-to-date information, please have a look at 0.10.2.

librosa.filters.constant_q_lengths

librosa.filters.constant_q_lengths(*, sr, fmin, n_bins=84, bins_per_octave=12, window='hann', filter_scale=1, gamma=0)[source]

Return length of each filter in a constant-Q basis.

Warning

This function is deprecated as of v0.9 and will be removed in 1.0. See librosa.filters.wavelet_lengths.

Parameters:
srnumber > 0 [scalar]

Audio sampling rate

fminfloat > 0 [scalar]

Minimum frequency bin.

n_binsint > 0 [scalar]

Number of frequencies. Defaults to 7 octaves (84 bins).

bins_per_octaveint > 0 [scalar]

Number of bins per octave

windowstr or callable

Window function to use on filters

filter_scalefloat > 0 [scalar]

Resolution of filter windows. Larger values use longer windows.

gammanumber >= 0

Bandwidth offset for variable-Q transforms. gamma=0 produces a constant-Q filterbank.

Returns:
lengthsnp.ndarray

The length of each filter.

See also

wavelet_lengths

Notes

This function caches at level 10.