Compute the variable-Q transform of an audio signal.
This implementation is based on the recursive sub-sampling method
described by [1].
Parameters:
ynp.ndarray [shape=(…, n)]
audio time series. Multi-channel is supported.
srnumber > 0 [scalar]
sampling rate of y
hop_lengthint > 0 [scalar]
number of samples between successive VQT columns.
fminfloat > 0 [scalar]
Minimum frequency. Defaults to C1 ~= 32.70 Hz
n_binsint > 0 [scalar]
Number of frequency bins, starting at fmin
intervalsstr or array of floats in [1, 2)
Either a string specification for an interval set, e.g.,
‘equal’, ‘pythagorean’, ‘ji3’, etc. or an array of
intervals expressed as numbers between 1 and 2.
.. see also:: librosa.interval_frequencies
gammanumber > 0 [scalar]
Bandwidth offset for determining filter lengths.
If gamma=0, produces the constant-Q transform.
If ‘gamma=None’, gamma will be calculated such that filter bandwidths are equal to a
constant fraction of the equivalent rectangular bandwidths (ERB). This is accomplished
by solving for the gamma which gives:
B_k=alpha*f_k+gamma=C*ERB(f_k),
where B_k is the bandwidth of filter k with center frequency f_k, alpha
is the inverse of what would be the constant Q-factor, and C=alpha/0.108 is the
constant fraction across all filters.
Here we use ERB(f_k)=24.7+0.108*f_k, the best-fit curve derived
from experimental data in [2].
bins_per_octaveint > 0 [scalar]
Number of bins per octave
tuningNone or float
Tuning offset in fractions of a bin.
If None, tuning will be automatically estimated from the signal.
The minimum frequency of the resulting VQT will be modified to
fmin*2**(tuning/bins_per_octave).
filter_scalefloat > 0
Filter scale factor. Small values (<1) use shorter windows
for improved time resolution.