torchaudio.prototype.functional.chroma_filterbank¶
- torchaudio.prototype.functional.chroma_filterbank(sample_rate: int, n_freqs: int, n_chroma: int, *, tuning: float = 0.0, ctroct: float = 5.0, octwidth: Optional[float] = 2.0, norm: int = 2, base_c: bool = True)[source]¶
DEPRECATED
Warning
This function has been deprecated. It will be removed from 2.9 release. This deprecation is part of a large refactoring effort to transition TorchAudio into a maintenance phase. Please see https://github.com/pytorch/audio/issues/3902 for more information.
Create a frequency-to-chroma conversion matrix. Implementation adapted from librosa.
- Parameters
sample_rate (int) – Sample rate.
n_freqs (int) – Number of input frequencies.
n_chroma (int) – Number of output chroma.
tuning (float, optional) – Tuning deviation from A440 in fractions of a chroma bin. (Default: 0.0)
ctroct (float, optional) – Center of Gaussian dominance window to weight filters by, in octaves. (Default: 5.0)
octwidth (float or None, optional) – Width of Gaussian dominance window to weight filters by, in octaves. If
None, then disable weighting altogether. (Default: 2.0)norm (int, optional) – order of norm to normalize filter bank by. (Default: 2)
base_c (bool, optional) – If True, then start filter bank at C. Otherwise, start at A. (Default: True)
- Returns
Chroma filter bank, with shape (n_freqs, n_chroma).
- Return type