librosax.feature.chroma_cqt¶
- chroma_cqt(*, y: Array | None = None, sr: float = 22050, C: Array | None = None, hop_length: int = 512, fmin: float | None = None, norm: str | float | None = inf, threshold: float = 0.0, tuning: float | None = 0.0, n_chroma: int = 12, n_octaves: int = 7, window: Array | None = None, bins_per_octave: int = 36, cqt_mode: str = 'full', **kwargs) Array[source]¶
Chromagram from a constant-Q transform.
- Parameters:
y –
Audio time series. The last axis must be time.
(T,)- single waveform(B, T)- batch of waveforms
sr – Sampling rate
C – Pre-computed CQT spectrogram with shape
(..., n_cqt_bins, N)hop_length – Number of samples between successive CQT columns
fmin – Minimum frequency. Default: C1 ~= 32.70 Hz
norm – Normalization mode for chroma
threshold – Pre-normalization energy threshold
tuning – Tuning deviation from A440 in fractional bins
n_chroma – Number of chroma bins to produce
n_octaves – Number of octaves to analyze above fmin
window – Optional weighting window
bins_per_octave – Number of bins per octave in the CQT
cqt_mode – CQT mode (‘full’ or ‘hybrid’)
**kwargs – Additional parameters for cqt
- Returns:
Chromagram with shape
(..., n_chroma, N).(T,)→(n_chroma, N)(B, T)→(B, n_chroma, N)