Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch mode produces voiceless notes #714

Open
olin256 opened this issue Jan 26, 2024 · 5 comments
Open

Batch mode produces voiceless notes #714

olin256 opened this issue Jan 26, 2024 · 5 comments

Comments

@olin256
Copy link

olin256 commented Jan 26, 2024

The following file was processed with -batch argument
505-3_small.png
with the resulting file
505-3_small.zip

Now the extra quarter note in measure 7 somehow got "voiceless" and is not present in the export. When this image is imported in the GUI, it is assigned to voice 2.

Perhaps this is not a bug and there is some logic behind this behaviour, but I couldn't find this in the documentation…

(Why there are five quarters at all: There was a triplet sign, but it got "accidentally" deleted in the preprocessing of the images.)

@hbitteur
Copy link
Contributor

In the MusicXML export, notes within the same measure are exported voice after voice.
So, if a note has no related voice, it won't get exported.

The question is why the fifth quarter wasn't assigned any voice.
This is certainly related to the 4/4 time signature (four quarters).
Note the measure rhythm is flagged as abnormal (painted with a pink background).

Here is the strip for this measure:

MeasureStack#7
    |0       |1/4     |1/2     |3/4     |1
--- P1
V 1 |Ch#480  |Ch#481  |Ch#482  |Ch#483  |1
V 2 |........|........|........|........|0

Note that voice N°2 exists but is empty!
Further investigation is needed...

@hbitteur
Copy link
Contributor

Displayed measure N°7:
image

Re-processing rhythm on this measure gives:

Measure{#7P1} No timeOffset for HeadChordInter#484{(0.947/0.947) stf:2 slot#5 dur:1/4}

@hbitteur
Copy link
Contributor

Here is what happened during the processing of measure rhythm:
5 slots were detected, each containing a quarter note.
For slot 1 (first in measure), the time offset was set to 0 (start of the measure) and the voice N°1 was created.
For slots 2, 3 and 4, the quarter note of the slot was time-compatible with the previous one, still in voice N°1.

Fot slot 5 however, the quarter note was not found time-compatible with the previous one, because this previous note ended at measure end. Hence there was no time left in voice N°1.
A new voice (N°2) was created for this quarter note.
But its time-offset since measure start could not be computed. Hence the warning message and the measure being set as abnormal.

From the engine point of view, that's all it could do!
[And this has nothing to do with the fact that the engine runs in batch or interactive mode].

@hbitteur
Copy link
Contributor

To be precise, the last chord (N°484) was assigned to voice N°2 (and indeed displayed in green, the color for voice N°2).
However its time-offset could not be set (thus impeding any export).
And the slot N°5 itself was discarded because its time-offset could not be computed.

@olin256
Copy link
Author

olin256 commented Jan 28, 2024

Thanks for the investigation, but I'm afraid I'm simply witnessing something else in the interactive mode—see this:
audi.gif
This is the resulting file:
505-3_small_gui.zip

EDIT: Sorry, I just re-opened the OMR file above and now I see that actually the note is "voiceless" there as well. Then perhaps we're talking about a different bug: The note is viewed as green (i.e. but belonging voice 2), but this is in fact not the case, as dumping measure voices shows.

EDIT2: Let me rephrase this from a very "high-level user" point of view: I've got a green note, but if I save the file and reopen it, it's no longer green…

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

No branches or pull requests

2 participants