Skip to content

Fix bar counting and markup placement in MusicXML export - #193

Open
FelippeRoza wants to merge 1 commit into
masterfrom
fix-failing-xml-tests
Open

Fix bar counting and markup placement in MusicXML export#193
FelippeRoza wants to merge 1 commit into
masterfrom
fix-failing-xml-tests

Conversation

@FelippeRoza

Copy link
Copy Markdown
Collaborator

test_partial and test_markup pass now, so the xfail markers are gone. Fixes #174.

Both broke at 5d89981. Bars close on accumulated note duration, not barchecks, and
several things were miscounted:

  • set_pickup() discarded the \partial duration, so the pickup bar swallowed the next
    measure. Now <measure number="0" implicit="yes">.
  • Note-attached markup is parsed after its note, so it landed one measure late. Now
    detected from its Postfix parent.
  • Chord notes after the first, and grace notes, went into the wrong bar. Both pre-existing.
  • \partial and bar duration leaked between parts.

chord_duration.xml regenerated: its expectation held the split chord (#171). A tuplet
closing a pickup bar still splits (#124).

The xfail tests test_partial and test_markup both broke at 5d89981. Bars
close on accumulated note duration rather than at barchecks, and several
things were not counted right:

* set_pickup() discarded the \partial duration, so the pickup bar never
  closed and swallowed the measure after it. Its length is now recorded
  and used, and the bar is exported as
  <measure number="0" implicit="yes">.
* Note-attached markup is parsed after its note, so it landed one measure
  late and texts from different bars were concatenated into one <words>.
  Whether a markup trails its note is now taken from its Postfix parent
  instead of the current bar's contents.
* Chord notes after the first were added to whichever bar was current by
  then, leaving an orphaned <chord/> opening the next measure.
* Grace notes were counted toward bar duration, so one could close a bar
  on its own and strand itself with no principal note to ornament.
* \partial and bar duration leaked from one part into the next.

The last three happen without \partial too. chord_duration.xml is
regenerated because its expectation held the split chord it was added to
catch in #171.

Fixes #174
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

Successfully merging this pull request may close these issues.

MusicXML: failing tests

1 participant