Home

constantQ

The constant-Q transform (CQT) is a time–frequency representation designed for musical signals in which the ratio of center frequency to bandwidth (the Q factor) remains approximately constant across analysis bins. This results in a set of logarithmically spaced frequency bins, so that equal steps in bin index correspond to equal musical intervals, such as semitones.

In a CQT, each bin k has center frequency f_k and bandwidth Δf_k chosen so that Q

Applications include musical pitch estimation, chord and key detection, timbre analysis, audio similarity, and music transcription.

Compared with STFT, CQT offers perceptually meaningful frequency resolution at the cost of greater computational complexity.

Variants and related approaches include log-frequency CQT implementations, octave-band filter banks, and wavelet-like transforms that approximate

=
f_k
/
Δf_k
is
constant.
As
a
consequence,
lower-frequency
bins
use
longer
analysis
windows
with
narrower
relative
bandwidths,
while
higher-frequency
bins
use
shorter
windows
with
broader
relative
bandwidths.
The
transform
can
be
computed
either
as
a
constant-Q
filter
bank
or
by
convolving
with
a
bank
of
kernels
derived
from
the
Fourier
transform.
The
CQT
is
often
preferred
to
the
short-time
Fourier
transform
when
analysis
aligned
to
musical
pitch
is
desired,
because
it
provides
higher
resolution
at
low
frequencies
and
scales
with
musical
notes.
Real-time
implementations
exist
using
FFT-based
kernels,
downsampling,
or
pruning
techniques
to
balance
accuracy
and
speed.
constant-Q
behavior.
Common
considerations
include
handling
of
edge
effects
at
the
low
end,
normalization
across
bins,
and
selection
of
the
Q
value
and
range
to
cover
a
desired
musical
spectrum.