Constant-Q Transform Chromagrams
- CQT chromagrams are time-varying pitch-class representations derived from a logarithmically spaced constant-Q transform with octave folding.
- They enable robust harmonic analysis, chord recognition, and key detection by collapsing spectral energy across octaves into 12 pitch classes.
- Despite aligning with musical pitch geometry, these features trade off temporal resolution and absolute register details in non-harmonic audio tasks.
ConstantāQ Transform (CQT) chromagrams are timeāvarying pitchāclass representations derived from a constantāQ timeāfrequency analysis. In their standard form, they are octaveāfolded matrices whose vertical axis indexes pitch classes such as , while the horizontal axis indexes time and the cell value encodes pitchāclass energy. Their defining front end is the ConstantāQ Transform, a logarithmically spaced filterbank in which the ratio between center frequency and bandwidth is constant across bins, making the representation particularly well aligned with musical pitch, harmony, and transposition structure (Wolf-Monheim, 2024). Across recent work, CQT chromagrams appear both as explicit features for chord and key analysis and as a conceptual substrate for broader pitchāaligned neural representations, but their utility is strongly task dependent: they are well suited to harmonic music analysis and often poorly matched to broadband, nonāharmonic audio classification (Wolf-Monheim, 9 Sep 2025).
1. ConstantāQ basis and musical frequency geometry
The mathematical basis of a CQT chromagram is the ConstantāQ Transform itself. In the constantāQ setting, the center frequency and bandwidth or of bin satisfy
with constant across bins. Multiple papers also describe the associated logarithmic frequency grid as
where is the number of bins per octave (Haimes, 11 Oct 2025). A standard discrete formulation uses binādependent window lengths,
so that low frequencies are analyzed with longer windows and high frequencies with shorter windows (Telila et al., 7 May 2025).
This construction yields the characteristic CQT timeāfrequency tradeāoff. At lower frequencies, bandwidths are narrower, frequency resolution is higher, and time resolution is poorer; at higher frequencies, bandwidths are wider, time resolution improves, and frequency resolution decreases (Wolf-Monheim, 2024). In contrast to the STFT, whose fixed window imposes constant absolute bandwidth, the CQT allocates resolution in a way that follows musical interval structure. Several papers emphasize that this logarithmic spacing makes octave relations and semitone shifts geometrically regular in the representation, which is one reason CQT is repeatedly described as especially suitable for music analysis, MIR, and pitchāstructured modeling (Geng et al., 12 May 2026).
The same geometry underlies claims of approximate pitch equivariance in convolutional systems. When pitch is shifted in audio, the corresponding harmonic pattern moves approximately as a vertical translation on a logāfrequency CQT image, so convolutional filters can be reused across registers. This argument is explicit in timbre transfer and diffusion work built on highāresolution CQT representations, and it provides an important conceptual bridge between raw CQT images and octaveāfolded chromagrams (Huang et al., 2018).
2. From CQT coefficients to octaveāfolded chroma
A CQT chromagram is obtained by collapsing CQT energy across octaves into pitch classes. One recent system defines it directly as a 12ādimensional, timeāvarying representation in which each dimension corresponds to one pitch class independent of octave (Haimes, 11 Oct 2025). More generally, if 0 denotes the CQT coefficient at time frame 1 and logāfrequency bin 2, then a chroma mapping takes the form
3
where 4 indexes pitch classes and 5 is a weighting matrix assigning CQT bins to chroma bins (Wolf-Monheim, 9 Sep 2025). Equivalent formulations sum over sets 6 of bins whose pitches belong to the same class modulo octave: 7
Operationally, the workflow is consistent across implementations. First, a magnitude or power CQT spectrogram is computed on a logarithmic frequency grid. Second, CQT bins are mapped to pitch classes modulo octave, typically producing 12 pitchāclass channels. Third, the perāframe chroma vectors may be normalized, often by library defaults such as those in librosa.feature.chroma_cqt; later variants such as CENS apply additional normalization and quantization on top of a CQTāchromagram base rather than redefining the underlying chroma representation (Wolf-Monheim, 2024).
The chromagramās information geometry is therefore markedly different from that of the underlying CQT. The CQT retains octave height, while the chromagram folds octaveāseparated bins into a single pitchāclass axis. This makes chromagrams transpositionā and registerātolerant in a musically useful way, but it also discards absolute register. A recurring practical implication is that octave folding is beneficial when harmonic function matters more than register, and detrimental when absolute spectral region or octave placement is discriminative. One scoreāfollowing study explicitly avoids full chroma collapse for this reason, preferring normalized CQT energy vectors with octave resolution because classical chromagrams can confuse repeated pitchāclass patterns appearing in different octaves (Lee, 2022).
3. Representation properties and comparison with adjacent front ends
CQT chromagrams are often contrasted with STFT chromagrams, mel spectrograms, and MFCCs. STFT chromagrams begin from a linearāfrequency STFT with fixed window length; they can provide good temporal resolution but have limited lowāfrequency resolution and are more sensitive to tuning and absolute frequency placement. CQT chromagrams, by contrast, inherit logarithmic spacing and higher lowāfrequency resolution from the constantāQ front end, which makes them natural for harmonic analysis, melody, chord recognition, and key detection, but they incur higher computational cost and can lose temporal resolution at low frequencies because of longer analysis windows (Wolf-Monheim, 9 Sep 2025).
Relative to mel spectrograms and MFCCs, chromagrams encode a different inductive bias. Mel and cepstral features preserve broader spectral envelope information and are not explicitly octave folded. CQT chromagrams instead privilege pitch classes and harmonic structure. This makes them attractive where pitchāclass content is central, but it can be a liability where broadband texture, noise profile, or absolute register carries more discriminative information. This contrast appears repeatedly in environmental sound work, where chromaābased features underperform melāscale or cepstral features despite their musical elegance (Wolf-Monheim, 2024).
It is also important to distinguish CQT chromagrams from fullāresolution CQT tensors used in modern neural audio systems. Polyphonic singing voice conversion, timbre transfer, and diffusionābased inverse problems often retain the full octaveāresolved CQT rather than folding to 12 chroma bins. Those systems exploit the same logāfrequency structure that motivates chromagrams, but they preserve octave information because harmony reconstruction, timbre modeling, and exact resynthesis depend on pitch height as well as pitch class (Moliner et al., 2022). This suggests a useful taxonomy: a chromagram is not the CQT itself, but a downstream, octaveācollapsed statistic of a pitchāaligned transform.
4. Computational frameworks, libraries, and parameterization
In contemporary practice, many CQT chromagrams are computed through librosa, and several empirical studies rely explicitly on the libraryās standard CQT/chroma routines rather than custom implementations (Wolf-Monheim, 2024). This is especially common in classification and interactive visualization work, where the emphasis is on comparing representations or building downstream systems rather than deriving new transforms. A consequence is that some papers document the conceptual transform carefully while leaving numeric defaults such as bins_per_octave, f_{\min}, hop size, or window type implicit.
Other work provides concrete parameterizations that clarify the design space. PolyāSVC uses audio resampled to 8, hop length 9 samples, 0 bins per octave, 1 total bins, and then crops the CQT to 2ā3 for singingārange modeling (Geng et al., 12 May 2026). TimbreTron uses 4 audio, 5 hop size, 6 bins per octave, 7 bins over seven octaves starting at C1, and a 8-scaling parameter 9 (Huang et al., 2018). CQTāDiff uses an invertible nonstationary Gabor implementation with 0 bins per octave over seven octaves and a rasterized constant time grid to support convolutional processing in the transform domain (Moliner et al., 2022).
The literature also contains algorithmic frameworks for exact or nearāexact inversion of the CQT front end. The CQāNSGT and sliCQ framework constructs an invertible constantāQ transform using nonstationary Gabor frames and sliceāwise processing for realātime operation, overcoming the nonāinvertibility and computational inefficiency of classical CQT implementations (Holighaus et al., 2012). QTAM extends the invertible Qātransform idea by demodulating each band to a slowly varying complex baseband envelope, enabling lossless decimation, exact reconstruction, and GPUāaccelerated dense timeāfrequency analysis (Asprea et al., 31 Mar 2026). These works do not produce chromagrams directly, but they matter because chromagrams are frequently computed from magnitude CQT representations that sit on top of such front ends.
Parameterization studies further show that bins per octave are not merely a cosmetic choice. A transcription study found that CQT with 12 bins per octave yielded low transcription accuracy, that moving to 24 bins per octave improved performance sharply, and that performance continued to improve up to 84 bins per octave before deteriorating again (Cheuk et al., 2020). Another piano AMT pipeline used 1 audio, 2 frames, and a C2āC8 note range, explicitly framing the CQT as the front end from which octaveācollapsed chroma could be derived if desired (Telila et al., 7 May 2025). This suggests that chromagram quality depends not only on the octaveāfolding rule but also on the spectral resolution available before folding.
5. Applications across harmony analysis, alignment, transcription, and neural audio
The most direct use case for CQT chromagrams remains harmonic music analysis. In a near realātime visualization system, a Librosa CQTābased chromagram is computed over 4āsecond audio chunks, averaged across time, squared for tonal emphasis, thresholded at 3 for audible tones and 4 for chord tones, and then used to infer root, major/minor third, and fifth. A confidence score derived from the relative energies of the major and minor third determines whether the GUI and Arduino LED display are updated; only detections with Moderate or higher confidence are shown (Haimes, 11 Oct 2025). This system also illustrates a common limitation: CQT chromagrams can support interpretable triad estimation, but the prototype does not detect inversions or extended chords such as sevenths and augmented chords.
Score following and alignment provide a different perspective. A DTW/OLTW follower computes normalized CQT magnitude vectors
5
from score audio and performance audio, and then aligns them with a local cost
6
In this setting, the CQT front end consistently and significantly outperforms a commonly used FFTābased approach, especially under polyphony and expressive timing variation (Lee, 2022). The same study explicitly argues against immediate collapse to 12āD chroma, because octaveāinvariant chromagrams can confuse structurally similar material presented in different registers.
Automatic music transcription sits between pitch salience and octave specificity. One piano AMT system feeds CQT coefficients directly into a CNN to predict a 72ādimensional noteāactivity vector spanning C2āC8 (Telila et al., 7 May 2025). A broader representation comparison for polyphonic multiāinstrument transcription reports that highāresolution logāfrequency STFT outperforms CQT under a simple network, even though CQT remains a musically aligned precursor from which chromagrams can be constructed (Cheuk et al., 2020). A plausible implication is that chromagrams are rarely the best representation for frameāaccurate note estimation when octave identity must be preserved, but they remain compelling when the target variable is harmonic function rather than noteālevel transcription.
In modern neural audio generation and conversion, octaveāresolved CQTs rather than chromagrams dominate, yet the connection to chroma remains close. TimbreTron treats logāmagnitude CQT as an image domain in which pitch shifts become approximate vertical translations, and CQTāDiff uses an invertible CQT to precondition a diffusion model so that pitch equivariance becomes translation equivariance for convolutions (Huang et al., 2018). PolyāSVC similarly adopts a CQTābased pitch representation because scalar 7 extractors are inadequate in harmonyārich or residualāpolyphony scenarios (Geng et al., 12 May 2026). These systems do not fold to chroma, but they show that the core constantāQ geometry underlying chromagrams remains central in contemporary pitchāaware deep audio models.
6. Task dependence, empirical performance, and recurrent misconceptions
The strongest empirical caution in the recent literature is that CQT chromagrams are not universally effective. In one ESCā50 environmental sound study using a shared deep CNN, CQT chromagrams reached 8 training accuracy, 9 validation accuracy, training loss 0, and validation loss 1, compared with 2 validation accuracy for melāscaled spectrograms and 3 for MFCCs (Wolf-Monheim, 2024). In a later ESCā50 study with the same representational family, CQT chromagrams obtained training accuracy 4, validation accuracy 5, training loss 6, and validation loss 7, again far below mel spectrograms and MFCCs; at category level, cyclic tempograms and chromagrams as a group occupied only a 8ā9 band for accuracy, precision, recall, and 0 (Wolf-Monheim, 9 Sep 2025). These studies support a general conclusion already stated by their authors: chromaābased features emphasize harmonic structure, which is often the wrong bias for ESCā50ās many nonāharmonic environmental sounds.
A related caution appears in general audio representation learning. One study comparing STFTābased mel preprocessing against CQT preprocessing for a PaSST backbone reports that STFT outperformed CQT in all tested tasks, including Beijing Opera classification (1 vs. 2), NSynth pitch (3 vs. 4), CREMAāD emotion (5 vs. 6), and FSD50K mAP (7 vs. 8) (Shah et al., 2023). Although this experiment concerns CQT spectrograms rather than chromagrams, it shows that pitchāaligned front ends do not automatically yield superior learned embeddings when architecture and objective are mismatched.
The opposite pattern appears in tasks where lowāfrequency pitch structure and harmonic resolution matter. A speech emotion recognition study finds that constantāQ representations provide higher timeāinvariance at low frequencies, better resolution of pitch harmonics than MFSC, and improved performance across four databases and six deep back ends (Singh et al., 2022). This does not validate chromagrams as such, but it reinforces the broader point that the constantāQ bias is beneficial when discriminative structure is tied to pitch and harmonics.
Two misconceptions therefore recur. The first is that CQT chromagrams are inherently superior because they are more āmusical.ā The evidence does not support that generalization; their success is domain specific. The second is that octave invariance is always desirable. In chord or key analysis, octave folding is often an asset; in score following, environmental audio, and noteālevel transcription, losing absolute register can be damaging (Lee, 2022). A precise summary is that CQT chromagrams are most effective when pitchāclass organization is the target signal and least effective when the task depends on broadband texture, absolute spectral placement, or octaveāresolved structure.
In this sense, CQT chromagrams occupy a distinct but limited place in the larger ecosystem of pitchāaware audio representations. They are concise, musically interpretable, and grounded in a timeāfrequency transform whose logarithmic geometry matches tonal organization. Yet the same octave folding that gives them elegance also imposes an information bottleneck. Recent work therefore points in two complementary directions: using CQT chromagrams explicitly for harmonic inference when pitch classes are the object of interest, and retaining full octaveāresolved CQT representations when modern neural systems need the same musical geometry without sacrificing pitch height.