The <attributes> element

Parent elements: <measure> (partwise), <part> (timewise)

The <attributes> element contains musical information that typically changes on measure boundaries. This includes key and time signatures, clefs, transpositions, and staving. When attributes are changed mid-measure, it affects the music in score order, not in MusicXML document order.

https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/attributes/

Hierarchy

  • Attributes

Implements

Constructors

Properties

schema: {
    attributes: {};
    contents: readonly [{
        type: "optional";
        value: typeof Footnote;
    }, {
        type: "optional";
        value: typeof Level;
    }, {
        type: "optional";
        value: typeof Divisions;
    }, {
        label: "keys";
        type: "label";
        value: {
            type: "zeroOrMore";
            value: typeof Key;
        };
    }, {
        label: "times";
        type: "label";
        value: {
            type: "zeroOrMore";
            value: typeof Time;
        };
    }, {
        type: "optional";
        value: typeof Staves;
    }, {
        type: "optional";
        value: typeof PartSymbol;
    }, {
        type: "optional";
        value: typeof Instruments;
    }, {
        label: "clefs";
        type: "label";
        value: {
            type: "zeroOrMore";
            value: typeof Clef;
        };
    }, {
        label: "staff-details";
        type: "label";
        value: {
            type: "zeroOrMore";
            value: typeof StaffDetails;
        };
    }, {
        label: "transpositions";
        type: "label";
        value: {
            choices: readonly [{
                label: "transposes";
                type: "label";
                value: {
                    type: "zeroOrMore";
                    value: typeof Transpose;
                };
            }, {
                label: "for-parts";
                type: "label";
                value: {
                    type: "zeroOrMore";
                    value: typeof ForPart;
                };
            }];
            type: "choices";
        };
    }, {
        label: "directives";
        type: "label";
        value: {
            type: "zeroOrMore";
            value: typeof Directive;
        };
    }, {
        label: "measure-styles";
        type: "label";
        value: {
            type: "zeroOrMore";
            value: typeof MeasureStyle;
        };
    }];
    name: "attributes";
} = Attributes.schema

Type declaration

  • Readonly attributes: {}
    • Readonly contents: readonly [{
          type: "optional";
          value: typeof Footnote;
      }, {
          type: "optional";
          value: typeof Level;
      }, {
          type: "optional";
          value: typeof Divisions;
      }, {
          label: "keys";
          type: "label";
          value: {
              type: "zeroOrMore";
              value: typeof Key;
          };
      }, {
          label: "times";
          type: "label";
          value: {
              type: "zeroOrMore";
              value: typeof Time;
          };
      }, {
          type: "optional";
          value: typeof Staves;
      }, {
          type: "optional";
          value: typeof PartSymbol;
      }, {
          type: "optional";
          value: typeof Instruments;
      }, {
          label: "clefs";
          type: "label";
          value: {
              type: "zeroOrMore";
              value: typeof Clef;
          };
      }, {
          label: "staff-details";
          type: "label";
          value: {
              type: "zeroOrMore";
              value: typeof StaffDetails;
          };
      }, {
          label: "transpositions";
          type: "label";
          value: {
              choices: readonly [{
                  label: "transposes";
                  type: "label";
                  value: {
                      type: "zeroOrMore";
                      value: typeof Transpose;
                  };
              }, {
                  label: "for-parts";
                  type: "label";
                  value: {
                      type: "zeroOrMore";
                      value: typeof ForPart;
                  };
              }];
              type: "choices";
          };
      }, {
          label: "directives";
          type: "label";
          value: {
              type: "zeroOrMore";
              value: typeof Directive;
          };
      }, {
          label: "measure-styles";
          type: "label";
          value: {
              type: "zeroOrMore";
              value: typeof MeasureStyle;
          };
      }]
    • Readonly name: "attributes"
    schema: {
        attributes: {};
        contents: readonly [{
            type: "optional";
            value: typeof Footnote;
        }, {
            type: "optional";
            value: typeof Level;
        }, {
            type: "optional";
            value: typeof Divisions;
        }, {
            label: "keys";
            type: "label";
            value: {
                type: "zeroOrMore";
                value: typeof Key;
            };
        }, {
            label: "times";
            type: "label";
            value: {
                type: "zeroOrMore";
                value: typeof Time;
            };
        }, {
            type: "optional";
            value: typeof Staves;
        }, {
            type: "optional";
            value: typeof PartSymbol;
        }, {
            type: "optional";
            value: typeof Instruments;
        }, {
            label: "clefs";
            type: "label";
            value: {
                type: "zeroOrMore";
                value: typeof Clef;
            };
        }, {
            label: "staff-details";
            type: "label";
            value: {
                type: "zeroOrMore";
                value: typeof StaffDetails;
            };
        }, {
            label: "transpositions";
            type: "label";
            value: {
                choices: readonly [{
                    label: "transposes";
                    type: "label";
                    value: {
                        type: "zeroOrMore";
                        value: typeof Transpose;
                    };
                }, {
                    label: "for-parts";
                    type: "label";
                    value: {
                        type: "zeroOrMore";
                        value: typeof ForPart;
                    };
                }];
                type: "choices";
            };
        }, {
            label: "directives";
            type: "label";
            value: {
                type: "zeroOrMore";
                value: typeof Directive;
            };
        }, {
            label: "measure-styles";
            type: "label";
            value: {
                type: "zeroOrMore";
                value: typeof MeasureStyle;
            };
        }];
        name: "attributes";
    } = ...

    Type declaration

    • Readonly attributes: {}
      • Readonly contents: readonly [{
            type: "optional";
            value: typeof Footnote;
        }, {
            type: "optional";
            value: typeof Level;
        }, {
            type: "optional";
            value: typeof Divisions;
        }, {
            label: "keys";
            type: "label";
            value: {
                type: "zeroOrMore";
                value: typeof Key;
            };
        }, {
            label: "times";
            type: "label";
            value: {
                type: "zeroOrMore";
                value: typeof Time;
            };
        }, {
            type: "optional";
            value: typeof Staves;
        }, {
            type: "optional";
            value: typeof PartSymbol;
        }, {
            type: "optional";
            value: typeof Instruments;
        }, {
            label: "clefs";
            type: "label";
            value: {
                type: "zeroOrMore";
                value: typeof Clef;
            };
        }, {
            label: "staff-details";
            type: "label";
            value: {
                type: "zeroOrMore";
                value: typeof StaffDetails;
            };
        }, {
            label: "transpositions";
            type: "label";
            value: {
                choices: readonly [{
                    label: "transposes";
                    type: "label";
                    value: {
                        type: "zeroOrMore";
                        value: typeof Transpose;
                    };
                }, {
                    label: "for-parts";
                    type: "label";
                    value: {
                        type: "zeroOrMore";
                        value: typeof ForPart;
                    };
                }];
                type: "choices";
            };
        }, {
            label: "directives";
            type: "label";
            value: {
                type: "zeroOrMore";
                value: typeof Directive;
            };
        }, {
            label: "measure-styles";
            type: "label";
            value: {
                type: "zeroOrMore";
                value: typeof MeasureStyle;
            };
        }]
      • Readonly name: "attributes"

      Methods

      Generated using TypeDoc