Skip to content

expose the id attribute of print and measure-style in mx::api #408

Description

@webern

MusicXML 3.1 gives many elements an optional id attribute. mx::api exposes the id of elements that have a matching mx::api type (#399). <print> and <measure-style> were left out.

Today the value is dropped. Reading a file loses it, and there is no way to author one.

Neither element has its own type in mx::api. Their contents are spread over several fields, and mx::impl builds the element on write.

<print> becomes ScoreData::layout, a std::map<MeasureIndex, LayoutData>, plus MeasureData::measureNumbering and its companion fields. ScoreData::layout is score-wide, but a <print> belongs to one part's measure, so MeasureWriter writes one <print> per part from a single LayoutData.

<measure-style> becomes MeasureData::multiMeasureRest and MeasureData::multiMeasureRestUseSymbols.

Because no single mx::api field stands for either element, there is nowhere to put the id.

Metadata

Metadata

Assignees

No one assigned

    Labels

    aiIssues opened by, or through, a coding agent.apiAffects the mx::api layerdesignNot a simple fix. Requires design decisions.featurenew feature request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions