Skip to content

Add a LyricIdentifiers detail, so lyrics can be compared without them - #23

Open
rdebroiz wants to merge 2 commits into
gregchapman-dev:developfrom
rdebroiz:feat/lyric-identifier-detail
Open

Add a LyricIdentifiers detail, so lyrics can be compared without them#23
rdebroiz wants to merge 2 commits into
gregchapman-dev:developfrom
rdebroiz:feat/lyric-identifier-detail

Conversation

@rdebroiz

Copy link
Copy Markdown
Contributor

What

Gives the lyric identifier attribute its own DetailLevel bit, LyricIdentifiers, the way Beams has one apart from NotesAndRests. AnnLyric now records lyric._identifier only when that bit is set.

The bit is part of OtherObjects, so AllObjects and the default detail level still compare identifiers exactly as before. What changes is that a caller asking for a narrower set no longer gets identifier-only differences it never asked for.

Why

We compare OMR output against ground truth. The recognizer has no way to guess a <lyric id="..."> value: it is a MusicXML bookkeeping attribute with no musical content, and it reads a page of printed music. So every predicted syllable carries an empty identifier while the ground truth carries verse or part1verse1.

Excluding lyrics wholesale is not an option, the syllables themselves are what we want to measure.

René-Paul Debroize and others added 2 commits August 10, 2026 15:55
A lyric identifier ('verse', 'part1verse1', etc) names a verse inside the
encoding and prints nothing in the score, so an OMR engine has nothing in
the image to guess it from, and two encodings of the same music routinely
name their verses differently.

Give it its own bit, like Beams has one apart from NotesAndRests. It stays
in OtherObjects, so the default comparison is unchanged; asking for Lyrics
alone now compares the syllables and their verse numbers, but not the
names the encoding gave those verses.
@gregchapman-dev

Copy link
Copy Markdown
Owner

This has bothered me for a while. Thanks for this fix! Can you please make it so that the new bit is not on by default?

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.

2 participants