Skip to content

Add musical key and BPM detection - #9

Open
crivote wants to merge 2 commits into
WB2024:mainfrom
crivote:main
Open

Add musical key and BPM detection#9
crivote wants to merge 2 commits into
WB2024:mainfrom
crivote:main

Conversation

@crivote

@crivote crivote commented Jul 8, 2026

Copy link
Copy Markdown

Essentia already comes with good old-school DSP algorithms for
key (Krumhansl-Kessler) and tempo (Percival), so I figured the
tagger might as well write those too while it's analysing the
audio anyway. The overhead is tiny (~0.6s per track) because
these are deterministic algorithms, not ML models.

New flags: --no-key, --no-bpm (both default on)

Tags written per format:

  • FLAC/OGG/Opus → INITIALKEY, BPM
  • MP3/AIFF/WAV → TKEY, TBPM
  • MP4/M4A → tmpo, initialkey
  • WMA → WM/InitialKey, WM/BeatsPerMinute
  • APEv2 → INITIALKEY, BPM

Includes 11 tests covering config, analysis, and tag writing
across formats.

crivote added 2 commits July 8, 2026 18:44
Essentia already comes with good old-school DSP algorithms for
key (Krumhansl-Kessler) and tempo (Percival), so I figured the
tagger might as well write those too while it's analysing the
audio anyway. The overhead is tiny (~0.6s per track) because
these are deterministic algorithms, not ML models.

New flags: --no-key, --no-bpm  (both default on)

Tags written per format:
  FLAC/OGG/Opus  → INITIALKEY, BPM
  MP3/AIFF/WAV   → TKEY, TBPM
  MP4/M4A        → tmpo, initialkey
  WMA            → WM/InitialKey, WM/BeatsPerMinute
  APEv2          → INITIALKEY, BPM

Includes 11 tests covering config, analysis, and tag writing
across formats.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant