Skip to content

cqt

cqt(y, sr?, hop_length?, fmin?, n_bins?, bins_per_octave?, tuning?, filter_scale?, norm?, sparsity?, window?, scale?, pad_mode?): object[][]

Defined in: packages/pleco-xa/src/scripts/xa-constantq.js:250

Constant-Q Transform of an audio signal (single-pass evaluation — see module header for documented divergences).

Legacy positional signature preserved.

Float32Array<ArrayBufferLike>

Audio time series

number = 22050

Sample rate

number = 512

Samples between successive CQT columns

number = null

Minimum frequency (Hz); defaults to C1

number = 84

Number of frequency bins

number = 12

Bins per octave

number = 0.0

Tuning offset in fractions of a bin

number = 1

Filter scale factor

number = 1

Filter normalization (1, 2, Infinity, or null)

number = 0.01

Accepted but not applied (dense basis)

string = 'hann'

Window function (‘hann’ only)

boolean = true

Divide by sqrt(filter length) (scale=True)

string = 'constant'

Padding mode for signal edges

object[][]

CQT [n_bins][n_frames] with n_frames = 1 + floor(len(y)/hop_length)

on invalid parameters or a filterbank exceeding Nyquist