/** * Rhythm analysis helpers: autocorrelation tempograms, tempo-candidate * ranking, and groove/swing analysis for DJ applications. * * NOTE (collision resolution, v2 wave 2): this module no longer exports * `tempo`, `beat_track`, or `dp_beat_track`. The canonical tempo/beat * engine lives in ./xa-beat-tracker.js. The `dp_beat_track` * implementation that used to live here had a verified backtracking bug * (indexOf of a float score in an index array) and was deleted outright. * What remains are the distinctly-named, salvageable helpers. */ /** * Compute tempogram using autocorrelation * @param {Array} onset_env - Onset strength envelope * @param {number} sr - Sample rate * @param {number} hop_length - Hop length * @param {number} ac_size - Autocorrelation size in seconds * @returns {Array} Tempogram */ export function compute_tempogram(onset_env: any[], sr: number, hop_length: number, ac_size: number): any[]; /** * Find tempo candidates from tempogram * @param {Array} tempogram - Autocorrelation tempogram * @param {number} sr - Sample rate * @param {number} hop_length - Hop length * @param {number} max_tempo - Maximum tempo * @param {number} min_tempo - Minimum tempo * @returns {Array} Tempo candidates sorted by strength */ export function find_tempo_candidates(tempogram: any[], sr: number, hop_length: number, max_tempo: number, min_tempo: number): any[]; /** * Find peaks with prominence calculation * @param {Array} signal - Input signal * @param {number} min_prominence - Minimum prominence * @returns {Array} Peak objects with prominence */ export function find_peaks_with_prominence(signal: any[], min_prominence?: number): any[]; /** * Apply tempo prior (favor common dance music tempos) * @param {Array} candidates - Tempo candidates to modify */ export function apply_tempo_prior(candidates: any[]): void; /** * Detect tempo multiples and submultiples * @param {number} base_tempo - Base tempo in BPM * @param {Array} candidates - All tempo candidates * @returns {Object} Tempo relationships */ export function detect_tempo_multiples(base_tempo: number, candidates: any[]): any; /** * Estimate groove and timing feel * @param {Array} beat_times - Beat times in seconds * @param {number} sr - Sample rate * @returns {Object} Groove analysis */ export function analyze_groove(beat_times: any[], _sr: any): any;