Audiveris / audiveris

Latest generation of Audiveris OMR engine
https://audiveris.github.io/audiveris
GNU Affero General Public License v3.0
1.55k stars 230 forks source link

Problem with manually changing the voice (No target duration error) #679

Open pheraph opened 1 year ago

pheraph commented 1 year ago

I am trying to transcribe the attached file. Overall, the recognition is pretty good. Apart from a few missing notes, I have a problem with the recognition or voice attribution of the first rests. This leads to the fact that these rests are missing in the MusicXML export in Musescore (the PDF export is fine though):

voices

Actually, the first rests should belong to the respective voices of the system. If now, for example, I select a first rest and manually assign it to voice 2 via Chords/Preferred Voice, the rest of the line is automatically assigned to voice 1 (and vice versa). And if I select the first two rests of the system and try to create a relation via Chords/Same Voice, I get the error in the log:

StackRhythm error processing MeasureStack#1 java.lang.IllegalArgumentException: no such vertex in graph: RestChordInter#4488{(0.798/0.798) stf:1}

Possibly the problem is related to the error message I get when transcribing:

System#1 No target duration for measures local IDs [1], please check time signatures

I am fairly new to the task, so it may very well be that some concepts are not familiar enough to me. I am using the latest development branch with JDK@17 on macOS if this helps.

hbitteur commented 1 year ago

@pheraph The first rest is a whole rest. By default, a whole rest is a measure-long rest, meaning that no other note (head or rest) can exist in the same voice in the same measure.

I can't see any barline in your example, so I can't see where any measure finishes. Or perhaps, the system itself is "the measure"? 1543-1623 indicates a rather old notation.

If I were you, I'd try to transcribe with a specific processing switch available in the pull-down menu Book | Set Book Parameters:

image

This "Partial whole rests" flag allows a WHOLE rest to be shorter than measure. So this may fix the problem.

pheraph commented 1 year ago

Thanks for your point of view and your plausible explanation. I was able to solve the problem by replacing the whole rest with two half rests. The "Partial whole rests" didn't help though. I suspect that the movement was originally set in mensural notation, which was without barlines (see https://en.wikipedia.org/wiki/Mensural_notation). I was wondering if there is a way to improve the recognition process for this problem, or perhaps to point it out when trying to change the voice. But I don't have a good idea at hand, and it's probably just a niche phenomenon anyway.