GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - djpardis/trailmix: Rust audio analysis for tempo, key, beats, and waveforms.

BranchesTags
Open more actions menu

Latest commit

 

History

41 Commits
41 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
benchmarks
benchmarks
 
 
brand
brand
 
 
crates
crates
 
 
docs
docs
 
 
schemas
schemas
 
 
scripts
scripts
 
 
.gitignore
.gitignore
 
 
ARCHITECTURE.md
ARCHITECTURE.md
 
 
BACKENDS.md
BACKENDS.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
INTEGRATION.md
INTEGRATION.md
 
 
LICENSE-APACHE
LICENSE-APACHE
 
 
LICENSE-MIT
LICENSE-MIT
 
 
README.md
README.md
 
 
RELEASE.md
RELEASE.md
 
 
ROADMAP.md
ROADMAP.md
 
 
THIRD_PARTY.md
THIRD_PARTY.md
 
 
TRANSFORMER.md
TRANSFORMER.md
 
 
USAGE.md
USAGE.md
 
 
eleventy.config.js
eleventy.config.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 

Repository files navigation

An illustrated mix of nuts, seeds, raisins, and chocolate

trail mix

CI DOI License: MIT OR Apache-2.0

trail mix is an audio-analysis library. It turns audio into versioned JSON for tempo, tempo segments, beat positions, key, key segments, and waveform display data.

It is built for local analysis in music applications, library import jobs, playback prep, annotation tools, and MIR research workflows. Cueport uses trail mix for local waveform and audio-analysis features.

Overview

The library has three independent analyzers for tempo and beats, key, and waveform. All three accept decoded mono PCM. The combined API runs them together and returns an aggregate result. Usage documents these interfaces, and Architecture describes their execution and result types.

Tempo and beat tracking use deterministic DSP. A 24-band spectral-flux onset function feeds autocorrelation-based tempo estimation and dynamic-programming beat placement. Across the GiantSteps full-track corpus and the FSL10K short-loop corpus, global BPM falls within 4 percent of the reference for about 40 to 70 percent of files. Accepting half- and double-time equivalents raises the range to about 60 to 80 percent.

Waveform analysis groups the PCM into display columns and stores the minimum, maximum, and RMS energy for each column. These values retain the information needed to draw a detailed overview without storing the full PCM.

Key estimation combines DSP with a compact learned component. DSP computes tuned twelve-bin pitch-class profiles, scores the 24 major and minor keys, and identifies local key segments. For global key, profile scoring reached a MIREX key score of about 61 on a sealed holdout. A compact transformer reranker using the same pitch-class sequence and DSP scores raises the MIREX key score to about 74, close to larger learned baselines on the same corpus. The transformer is used only for global key selection. Its weights and forward pass are embedded in the Rust binary, so the release build does not require a separate inference framework.

Design principles

  • Local analysis. All analysis runs in the host application rather than a remote service, so it works offline.
  • Methods selected by measured accuracy. Tempo, beats, waveform data, chroma, and local key segments use deterministic Rust DSP. Global key uses a compact transformer.
  • No separate model runtime. The compact transformer's weights and forward pass are embedded in the Rust binary, so applications do not need to install or package an inference framework such as ONNX Runtime.
  • Single binary. The release CLI includes common codecs, all three analyzers, and the embedded key model with no external files or downloads.
  • Portable core. The analyzer crates compile for ARM, x86, and WebAssembly. File decoding is separate from the analyzer core.
  • Inspectable outputs. Public APIs expose confidence scores, chroma, the DSP key prior, tempo and key segments, and waveform summaries.

Research

  • Noorzad, P. (2026). Deployment-constrained key estimation with a DSP-guided transformer reranker. arXiv preprint.
  • Noorzad, P. (2026). trail mix: DSP analysis with a compact transformer key reranker. UBC IEEE Lunch and Learn, October 26.
  • Noorzad, P. (2026). trail mix: Open tempo, key, and waveform analysis. FOSSY, August 9.

Contributing

See CONTRIBUTING.md for local checks, data rules, and commit style, RELEASE.md for the release process, and ROADMAP.md for near-term evaluation and reproducibility work.

License

trail mix is available under your choice of the MIT License or the Apache License, Version 2.0. Codec-related notices are recorded in THIRD_PARTY.md.

About

Rust audio analysis for tempo, key, beats, and waveforms.

trailmix.tools

Topics

audio-analysisbeat-trackingbpm-detectiondspkey-detectionmusic-information-retrievalrusttempo-estimationwaveform

Resources

Readme

Contributing

Contributing
Activity

Stars

4 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.