Two entry points
trailmix_codecs::analyze_path() accepts an audio file and handles decoding, mono PCM prep, and analysis.
trailmix::analyze() accepts mono PCM directly.
Both return the same Analysis JSON.
trail mix is a Rust workspace. It accepts an audio file or mono PCM and returns
tempo, key, beat positions, and waveform data as versioned JSON. beat-salad,
key-lime, and sampler-platter are independent crates that can be used on their
own. trailmix is an optional facade that runs all three and returns one combined
result. trailmix-codecs handles file decoding and mono prep. Persistence and
transport are caller responsibilities.
trailmix_codecs::analyze_path() accepts an audio file and handles decoding, mono PCM prep, and analysis.
trailmix::analyze() accepts mono PCM directly.
Both return the same Analysis JSON.
The default analyzers use deterministic DSP rather than bundled neural-network weights. The core build remains small, inspectable, and fully offline, but will not match specialized ML systems on every dataset.
Each crate performs one analysis task and can be used on its own. The trail mix facade runs all three and returns one combined result.
Estimates global BPM, beat positions with downbeat inference, and local tempo segments using autocorrelation with harmonic scoring and a gentle octave prior.
Estimates global and local major or minor keys with dual chroma extraction, multiple key profiles, median aggregation, and confidence-gated segmentation.
Generates compact min, max, and RMS waveform columns for display.