audiveris icon indicating copy to clipboard operation
audiveris copied to clipboard

Some measures are missing in exported MusicXML

Open lallafa opened this issue 2 years ago • 7 comments

Measure 5 and 6 are missing in the MusicXML export for this example:

16-omr 16-musescore
    <!--=======================================================-->
    <measure number="5" width="123"></measure>
    <!--=======================================================-->
    <measure number="6" width="122"></measure>
    <!--=======================================================-->

I am using the latest version from the development branch (commit f3b495c23).

The full example is here:

book_and_musicxml.zip

This is the log outout:

[Lee 16] Loaded image 1 2266x1694 from /Users/xxx/Downloads/Lee 16.png
[Lee 16] Discarding alpha band ...
[Lee 16] Converting max RGB to gray
[Lee 16] Book reaching PAGE on sheets:[#1]
[Lee 16] Beam  guessed height: 10 -- 0.50 of 20 interline
[Lee 16] Beam measured height: 15 -- 0.64 of [6..20] range at 425% of needed quorum
[Lee 16] Scale{ smallinterline(16,17,18) interline(19,20,21) line(2,3,5) beam(15)}
[Lee 16] Global slope: -0.00365
[Lee 16] Retrieved line clusters: 4 of sizes [5] with interline(19,20,21)
[Lee 16] Searching clusters with smallInterline: 17
[Lee 16] Retrieved line clusters: 4 of sizes [5] with interline(16,17,18)
[Lee 16] Systems: #1[1, 2] #2[3, 4] #3[5, 6] #4[7, 8]
[Lee 16] System#1
[Lee 16]    PartGroup{brace number:1 barline:false staves:1-2}
[Lee 16] System#2
[Lee 16]    PartGroup{brace number:1 barline:false staves:3-4}
[Lee 16] System#3
[Lee 16]    PartGroup{brace number:1 barline:false staves:5-6}
[Lee 16] System#4
[Lee 16]    PartGroup{brace number:1 barline:false staves:7-8}
[Lee 16] Indentation detected for system#1
[Lee 16] 2 parts along 4 systems
[Lee 16] Created scores: [{Score 1}]
[Lee 16] Discarding alpha band ...
[Lee 16] Converting max RGB to gray
[Lee 16] stem(3 max:4)
[Lee 16] Scale information: HeadSeeds{NOTEHEAD_VOID[L:0.7,R:0.2] NOTEHEAD_BLACK[L:-0.5,R:-0.7]}
[Lee 16] Stems free length median value: 53 pixels, 2.7 interlines
[Lee 16] Step CUE_BEAMS is skipped because small heads switch is off
[Lee 16] 28 raw measures: [7 in system#1, 7 in system#2, 7 in system#3, 7 in system#4]
[Lee 16] Slurs: 17
[Lee 16] Segments: 5
[Lee 16] No timeRational value for TimePairInter#268{(0.957/0.957) stf:1 NO_VALUE}
[Lee 16] System#1 No target duration for measures local IDs [1, 2, 3, 4, 5, 6, 7], please check time signatures
[Lee 16] System#2 No target duration for measures local IDs [8, 9, 10, 11, 12, 13, 14], please check time signatures
[Lee 16] System#3 No target duration for measures local IDs [15, 16, 17, 18, 19, 20, 21], please check time signatures
[Lee 16] System#4 No target duration for measures local IDs [22, 23, 24, 25, 26, 27, 28], please check time signatures
Error in mouseReleased java.lang.NullPointerException: Cannot read field "x" because "this.rawRect" is null
[Lee 16] Exporting sheet(s): [#1]
[Lee 16] Score Untitled exported to /Users/xxx/Library/AudiverisLtd/audiveris/data/Lee 16/Untitled.mxl
[Lee 16] Exporting sheet(s): [#1]
[Lee 16] Score 1 exported to /Users/xxx/Library/AudiverisLtd/audiveris/data/Lee 16/1.mxl
[Lee 16] Stored /book.xml
[Lee 16] Stored /sheet#1/BINARY.png
[Lee 16] Stored /sheet#1/sheet#1.xml
[Lee 16] Book stored as /Users/xxx/Library/AudiverisLtd/audiveris/data/Lee 16/book

lallafa avatar Jun 11 '23 20:06 lallafa

@lallafa Many apologies for such a late answer, I just got back from a hike of several weeks, without any computer in my backpack :-) I'm looking at your issue right now. Stay tuned.

hbitteur avatar Jun 18 '23 14:06 hbitteur

@lallafa I could not reproduce the missing measures in your example. However, it helped me detect and fix bugs in time signatures, plus I could improve the handling of part names.

Please pull again from "development" branch, latest commit is cb9c903dd21392b30508a78e14ee45b04bd5aaf4 And keep me informed about this new version. Again, sorry for the delay.

hbitteur avatar Jun 19 '23 16:06 hbitteur

No news on this issue. Should we close it?

hbitteur avatar Jun 29 '23 07:06 hbitteur

@hbitteur sorry for responing late.

I still get the same missing measures. This are my steps:

I tried the same with a fresh working copy from "development" branch, latest commit is 1fe68335a with the same result: 16-development.mxl.zip 20230629T211307.log

I can start a debugger from Netbeans. Do you have any suggestions where i can start debugging (breakpoints)?

lallafa avatar Jun 29 '23 19:06 lallafa

@lallafa We have a misunderstanding somewhere, but where?

I just retried the transcription from scratch. I simply corrected manually the "détaché" word, a missing natural sign in measure 5 and a missing half note in measure 2 and in measure 4. Nothing more. These corrections were not mandatory, but performed to ease the visual check of every measure in the first system. Then I ran Finale and Musescore on the exported MusicXML.

Snapshot from Finale:

image

Snapshot from Musescore:

image

The page layout of Musescore is different from Finale, but the logical content is the same: We can see every measure from measure 1 to measure 7.

Also, I manually checked the content of MusicXML, there is nothing special regarding measures 5 and 6 which in your display contain just a + sign and a whole rest. Here is the relevant excerpt of MusicXML file:

    <!--=======================================================-->
    <measure number="5" width="123">
      <note default-x="12">
        <pitch>
          <step>B</step>
          <alter>-1</alter>
          <octave>3</octave>
        </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem default-y="-47">down</stem>
        <beam number="1">begin</beam>
      </note>
      <note default-x="26">
        <pitch>
          <step>F</step>
          <octave>3</octave>
        </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem default-y="-47">down</stem>
        <beam number="1">continue</beam>
      </note>
      <note default-x="46">
        <pitch>
          <step>E</step>
          <octave>3</octave>
        </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <accidental>natural</accidental>
        <stem default-y="-45">down</stem>
        <beam number="1">continue</beam>
      </note>
      <note default-x="65">
        <pitch>
          <step>F</step>
          <octave>3</octave>
        </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem default-y="-44">down</stem>
        <beam number="1">continue</beam>
      </note>
      <note default-x="82">
        <pitch>
          <step>G</step>
          <octave>3</octave>
        </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem default-y="-43">down</stem>
        <beam number="1">continue</beam>
      </note>
      <note default-x="99">
        <pitch>
          <step>A</step>
          <octave>3</octave>
        </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem default-y="-42">down</stem>
        <beam number="1">end</beam>
      </note>
    </measure>
    <!--=======================================================-->
    <measure number="6" width="122">
      <note default-x="12">
        <pitch>
          <step>B</step>
          <alter>-1</alter>
          <octave>3</octave>
        </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem default-y="-48">down</stem>
        <beam number="1">begin</beam>
      </note>
      <note default-x="27">
        <pitch>
          <step>F</step>
          <octave>3</octave>
        </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem default-y="-48">down</stem>
        <beam number="1">continue</beam>
      </note>
      <note default-x="48">
        <pitch>
          <step>E</step>
          <octave>3</octave>
        </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <accidental>natural</accidental>
        <stem default-y="-46">down</stem>
        <beam number="1">continue</beam>
      </note>
      <note default-x="64">
        <pitch>
          <step>F</step>
          <octave>3</octave>
        </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem default-y="-45">down</stem>
        <beam number="1">continue</beam>
      </note>
      <note default-x="82">
        <pitch>
          <step>G</step>
          <octave>3</octave>
        </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem default-y="-44">down</stem>
        <beam number="1">continue</beam>
      </note>
      <note default-x="99">
        <pitch>
          <step>A</step>
          <octave>3</octave>
        </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem default-y="-44">down</stem>
        <beam number="1">end</beam>
      </note>
    </measure>
    <!--=======================================================-->

I also tried with Primus and EasyABC, results are OK.

We can suspect a problem with the software used to read MusicXML on your side. Which software was it?

hbitteur avatar Jun 30 '23 09:06 hbitteur

We can suspect a problem with the software used to read MusicXML on your side. Which software was it?

I'm stupid. The problem is in the exported MusicXML data:

  • "mine" is listed just above
  • "yours" was listed near the beginning of this issue. It is as follows:
    <!--=======================================================-->
    <measure number="5" width="123"></measure>
    <!--=======================================================-->
    <measure number="6" width="122"></measure>
    <!--=======================================================-->

These measures are obviously empty.

Let's make sure we are using the same Audiveris code. Mine is the very last version on "development" branch, commit 1d4fa9d3eade318fda4cc59d39efc85ece1825d1

hbitteur avatar Jun 30 '23 09:06 hbitteur

I can start a debugger from Netbeans. Do you have any suggestions where i can start debugging (breakpoints)?

In class PartwiseBuilder, set a breakpoint in method processMeasure (Measure measure) It is on line 1900.

hbitteur avatar Jun 30 '23 09:06 hbitteur