Skip to content

Connect unused RhythmDescriptors sources in EssentiaBpmDetector#72

Merged
pixelate merged 1 commit into
mainfrom
fix-essentia-rhythm-descriptors-sinks
Jun 7, 2026
Merged

Connect unused RhythmDescriptors sources in EssentiaBpmDetector#72
pixelate merged 1 commit into
mainfrom
fix-essentia-rhythm-descriptors-sinks

Conversation

@pixelate

@pixelate pixelate commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Problem

EssentiaBpmDetector was silently failing on every file:

RuntimeError: RhythmDescriptors::beats_position is not connected to any sink

Newer Essentia requires every streaming source on an algorithm to be connected to a sink. The script only connected bpm and confidence, leaving the remaining RhythmDescriptors outputs dangling. This raised the error, detect returned nil, and analyze silently fell back to PercivalBpmDetector — so BPMs were still produced, but the higher-quality detector never actually ran.

Fix

Connect the unused RhythmDescriptors sources to None, Essentia's idiomatic way to discard a streaming output. Kept RhythmDescriptors rather than switching to RhythmExtractor2013 to minimize the change.

Testing

Verified against a fixture — detect now returns a result instead of raising:

{bpm: 120, confidence: 0.0}

(Synthetic test tone, hence confidence: 0.0; the point is no exception and the Essentia path now runs.)

🤖 Generated with Claude Code

Newer Essentia requires every streaming source to be connected to a
sink. RhythmDescriptors exposes many outputs beyond bpm/confidence, and
leaving them dangling raised "beats_position is not connected to any
sink", causing EssentiaBpmDetector.detect to fail and silently fall back
to PercivalBpmDetector. Connect the unused sources to None so the
higher-quality detector runs again.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@pixelate
pixelate merged commit 7aec95a into main Jun 7, 2026
3 checks passed
@pixelate
pixelate deleted the fix-essentia-rhythm-descriptors-sinks branch June 7, 2026 16:38
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