Skip to main content

Module music

Module music 

Source
Expand description

Swarm M — foundational music features (assumptions declared).

Structs§

MusicAssumptions
Declared analysis assumptions (never implicit universal truth).
OnsetEvent
PitchEstimate
StructureSegment
Coarse structure segment (energy-change boundaries).
TempoEstimate
Estimated tempo from inter-onset intervals (reference; not a production beat tracker).

Functions§

chroma12_from_mel
Chroma-like 12-bin energy from log-mel (only if assumes_12tet).
detect_onsets
Spectral flux style onset detection on mono frames.
estimate_f0_hz
F0 for one frame via the real YIN estimator (CMND + absolute threshold + parabolic interpolation) in features::pitch. Replaced the earlier coarse integer-lag argmin. Allocates a per-call difference-function scratch (this is the batch convenience path; the zero-heap path is features::pitch::yin_pitch with a caller-owned scratch).
estimate_tempo_from_onsets
Estimates tempo from onsets.
music_class_onset
Music-class onset.
propose_structure_segments
Split mono into up to out.len() energy-based segments (proposal only).
track_pitch
Pitch track over successive frames (caller-buffered).