Skip to content

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

Open
rdebroiz wants to merge 1 commit 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 1 commit 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.

@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?

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, next to Style, Metadata and Voicing: outside of every
combination, so AllObjects (the default) no longer counts a differing verse
name as an error, and lyrics are compared on their syllables and verse
numbers alone. Ask for it by hand ('-i allobjects lyricidentifiers') to
compare the names too.
@rdebroiz
rdebroiz force-pushed the feat/lyric-identifier-detail branch from e6a4892 to 53335d2 Compare August 27, 2026 10:09
@rdebroiz

Copy link
Copy Markdown
Contributor Author

I removed LyricIdentifiers from OtherObjects so the lyrics ids should not be compared by default anymore.

@gregchapman-dev

Copy link
Copy Markdown
Owner

Thanks! I will review properly in a couple weeks.

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