Skip to main content

Module cqt_bake

Module cqt_bake 

Source
Expand description

Constant-Q transform sidecar bake — log-spaced bins for timbral integrity (cold path).

Functions§

bake_cqt_sidecar_from_preview
Bake CQT sidecar into caller buffer (_pad = SIDECAR_KIND_CQT).
bake_cqt_sidecar_from_samples
Bake a CQT sidecar from REAL audio samples: compute the genuine forward CQT, reduce n_binsSPECTRAL_PREVIEW_BINS, and write a single-frame sidecar through the same header machinery as bake_cqt_sidecar_from_preview (_pad = SIDECAR_KIND_CQT). When n_bins == SPECTRAL_PREVIEW_BINS the magnitudes are used directly.
forward_cqt
Real forward constant-Q transform over actual audio samples — direct constant-Q (one complex inner product per log-spaced bin; CPU is fine, this is a cold-path ingest transform).
preview_to_cqt_frame
Map linear preview energy into log-spaced CQT bins (MIDI-ish spacing across 64 bins).