audiveris icon indicating copy to clipboard operation
audiveris copied to clipboard

Chords resist voice assignment

Open olin256 opened this issue 2 years ago • 6 comments

Offending file The problem is with the half notes in the last measure – even though I've manually assigned the "Preferred Voice" to them and also added "Next in Voice" relations, they do not change their colour and are missing from the XML export.

Any voice-related manipulation with them results in StackRhythm error processing MeasureStack#14 java.lang.NullPointerException: Cannot read field "x" because the return value of "org.audiveris.omr.sig.inter.Inter.getCenter()" is null

olin256 avatar Oct 28 '23 13:10 olin256

I've somehow managed to cope with the above file, but in general, I sometimes run into situations where I'm literally fighting with the voice assignment algorithm. Today's example is the following: 064.zip I've added all sorts of relations and set preferred voices in measure 7, yet I'm still getting a mess…

Could there be an option to assign the voices manually, completely overriding the algorithm? That would save a lot of time in cases like this.

On a slightly unrelated note, it seems to be impossible to assign relations to a pair of notes not of the same staff (which could be useful in this particular case…)

olin256 avatar Feb 29 '24 06:02 olin256

Yet another instance: 083.zip No chance to get the voices correct in measure 13…

olin256 avatar May 31 '24 15:05 olin256

Getting back to your first message:

Any voice-related manipulation with them results in StackRhythm error processing MeasureStack#14 java.lang.NullPointerException: Cannot read field "x" because the return value of "org.audiveris.omr.sig.inter.Inter.getCenter()" is null

Reprocessing measure 14 failed due to a manually entered head chord (ID 3556) with null fields.

I manually removed this Inter from the .omr file (I mean by manually editing the .omr file!, because Audiveris could not work with this Inter, and in particular could not remove it). And now re-processing measure 14 works OK and provides correct voices immediately: image

Do you remember when and how you had created this strange head chord inter?

hbitteur avatar Jun 01 '24 17:06 hbitteur

I've somehow managed to cope with the above file, but in general, I sometimes run into situations where I'm literally fighting with the voice assignment algorithm. Today's example is the following: 064.zip I've added all sorts of relations and set preferred voices in measure 7, yet I'm still getting a mess…

image

Trying to reprocess this measure gives:

Measure{#7P1} No timeOffset for HeadChordInter#5691{(0.951/0.951) slot#2 dur:1/4}

This chord 5691 is a quarter, assigned to slot 2, but for which the time offset could not be computed. Hence the pink background for the measure.

We can check the content of first slot (drag with right mouse button pressed, on the mixed display): image This first slot contains the chords 5649, 5648 and 5690 but not the chord 5691.

The root cause is that this chord 5691 is too far abscissa-wise from the other chords.

To fix that, we manually select the 4 chords via a lasso and select in the Chords menu the item "Same time slot for all". image

Et voilà: image

hbitteur avatar Jun 01 '24 17:06 hbitteur

Yet another instance: 083.zip No chance to get the voices correct in measure 13…

image

We can see that the first slot (time offset 0) is very close to the starting barline. In fact, this is due to a slur portion mistaken with a (false) half-rest chord 7956. We can simply deassign this Inter 7956. Et voilà: image

hbitteur avatar Jun 01 '24 18:06 hbitteur

Thanks!

re 002: I'm sorry, it's been a long time since I created that file… I tried to transcribe the image with a fresh install of 5.3.1, but the issue did not occur, so it's a mystery for me, too.

re 064: Thanks, I was not aware of this time slot manipulation! This is so far the only time Audiveris got it wrong for me.

re 083: Oh, I should have been more careful, this is a silly mistake, sorry for bothering you with that!

olin256 avatar Jun 02 '24 14:06 olin256