Skip to content

expose the id attribute of harmony and frame in mx::api #406

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). <harmony> and <frame> were left out.

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

DirectionData::chords is a std::vector<ChordData>. One ChordData models one <harmony-chord>, not one <harmony>. DirectionWriter::createHarmonyElements writes all of a DirectionData's chords into a single <harmony> element. Several ChordData can therefore share one <harmony>, and none of them owns its id.

<frame> is a child of <harmony>, not of a <harmony-chord>. mx::api holds it as ChordData::frameData (src/include/mx/api/ChordData.h), so it has the same problem.

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.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