gregchapman-dev / musicdiff

A music score notation diff package (and command line tool)
Other
32 stars 4 forks source link

Unexplained diffs with lyrics #13

Open rigaux opened 1 month ago

rigaux commented 1 month ago

Hi there

Our OMR produces lyrics, and they seem quite correct when we look at the result. However musicdiff finds a lot of differences. Some of them come from the "label" attribute, present in one source and not in the reference. Is it justified ?

Even though we get rid of labels, we still have errors. We suspect the encoding. Your opinion is more than welcome !

Attached: both files files.zip

rigaux commented 1 month ago

The results (PDF files showing diffs)

C006_ref_diff.pdf C006_9_7_17h_diff.pdf

gregchapman-dev commented 1 month ago

This is a well-detailed report; thank you! I will look at this today.

gregchapman-dev commented 1 month ago

OK, it was still about the lyric labels. I have fixed musicdiff (develop branch) to ignore lyric labels that are the same as the lyric number (since they are redundant, and sometimes stored in files, and sometimes not, for the exact same result).

There are still a few lyric differences, and (as far as I have checked) they are differences in @con and @wordpos attributes, which really do affect the lyric syllables.

Note that when testing the develop branch, you will find that the command line has changed a little, to allow you to specify multiple sets of details, which then requires the use of -- before specifying the two file paths:

    python3 -m musicdiff -d GeneralNotes Lyrics Style -- file1.musicxml file2.krn

You might be interested to test out this new feature as well... :-)

rigaux commented 1 month ago

That's great Greg, thank you so much. We are entering in a phase of intensive testing and evaluation and your tool is so much appreciated. We will keep you informed of further developments on our side.

gregchapman-dev commented 1 month ago

Oh, one more thing to be aware of on the develop branch: by default you will get a new "inside-the-measure comparison of GeneralNotes" algorithm that pays no attention to voicing (i.e. it just compares all the notes in the measure, no matter what voice or chord they are found in). This works quite well, but I'm still tweaking it. So if you want to go back to the old algorithm, you should add Voicing to the list of things you would like compared on the command line. For example:

    python3 -m musicdiff -d GeneralNotes Voicing Lyrics -- file1.musicxml file2.krn
gregchapman-dev commented 1 month ago

Fixed in v4, released today.