Skip to content

the writer takes a part's staff count from its first measure only #442

Description

@webern

PartWriter::writeMeasures builds one MeasureCursor from the first measure's staff count
(src/private/mx/impl/PartWriter.cpp:311), and every MeasureWriter copies that cursor
(MeasureWriter.cpp:64-66). NoteWriter writes <staff> only when the cursor has more than one
staff (NoteWriter.cpp:406).

So when authored ScoreData has one staff in its first measure and two in a later one, the later
measure's second-staff notes are written without <staff> and read back on staff 1. The reader
never produces this shape, because it gives every measure the part's maximum staff count
(PartReader.cpp:147-204), so round-trip tests do not catch it.

Found while auditing silent recoveries for #432 (#439).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    aiIssues opened by, or through, a coding agent.bugsoftware defectimplAffects the mx::impl layernon-breakingfixes or implementation that do not require breaking changes

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions