Parent element: <score-part>

The <score-instrument> element represents a single instrument within a <score-part>. As with the <score-part> element, each <score-instrument> has a required ID attribute, a name, and an optional abbreviation.

A <score-instrument> element is also required if the score specifies MIDI 1.0 channels, banks, or programs. An initial <midi-instrument> assignment can also be made here. MusicXML software should be able to automatically assign reasonable channels and instruments without these elements in simple cases, such as where part names match General MIDI instrument names.

The <score-instrument> element can also distinguish multiple instruments of the same type that are on the same part, such as Clarinet 1 and Clarinet 2 instruments within a Clarinets 1 and 2 part.

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

Hierarchy

  • ScoreInstrument

Implements

Constructors

Properties

schema: {
    attributes: {
        id: {
            type: "required";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "_";
            };
        };
    };
    contents: readonly [{
        type: "required";
        value: typeof InstrumentName;
    }, {
        type: "optional";
        value: typeof InstrumentAbbreviation;
    }, {
        type: "optional";
        value: typeof InstrumentSound;
    }, {
        label: "instrument-types";
        type: "label";
        value: {
            type: "zeroOrMore";
            value: {
                choices: readonly [typeof Solo, typeof Ensemble];
                type: "choices";
            };
        };
    }, {
        type: "optional";
        value: typeof VirtualInstrument;
    }];
    name: "score-instrument";
} = ScoreInstrument.schema

Type declaration

  • Readonly attributes: {
        id: {
            type: "required";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "_";
            };
        };
    }
    • Readonly id: {
          type: "required";
          value: {
              pattern: RegExp;
              type: "regex";
              zero: "_";
          };
      }
      • Readonly type: "required"
      • Readonly value: {
            pattern: RegExp;
            type: "regex";
            zero: "_";
        }
        • Readonly pattern: RegExp
        • Readonly type: "regex"
        • Readonly zero: "_"
  • Readonly contents: readonly [{
        type: "required";
        value: typeof InstrumentName;
    }, {
        type: "optional";
        value: typeof InstrumentAbbreviation;
    }, {
        type: "optional";
        value: typeof InstrumentSound;
    }, {
        label: "instrument-types";
        type: "label";
        value: {
            type: "zeroOrMore";
            value: {
                choices: readonly [typeof Solo, typeof Ensemble];
                type: "choices";
            };
        };
    }, {
        type: "optional";
        value: typeof VirtualInstrument;
    }]
  • Readonly name: "score-instrument"
schema: {
    attributes: {
        id: {
            type: "required";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "_";
            };
        };
    };
    contents: readonly [{
        type: "required";
        value: typeof InstrumentName;
    }, {
        type: "optional";
        value: typeof InstrumentAbbreviation;
    }, {
        type: "optional";
        value: typeof InstrumentSound;
    }, {
        label: "instrument-types";
        type: "label";
        value: {
            type: "zeroOrMore";
            value: {
                choices: readonly [typeof Solo, typeof Ensemble];
                type: "choices";
            };
        };
    }, {
        type: "optional";
        value: typeof VirtualInstrument;
    }];
    name: "score-instrument";
} = ...

Type declaration

  • Readonly attributes: {
        id: {
            type: "required";
            value: {
                pattern: RegExp;
                type: "regex";
                zero: "_";
            };
        };
    }
    • Readonly id: {
          type: "required";
          value: {
              pattern: RegExp;
              type: "regex";
              zero: "_";
          };
      }
      • Readonly type: "required"
      • Readonly value: {
            pattern: RegExp;
            type: "regex";
            zero: "_";
        }
        • Readonly pattern: RegExp
        • Readonly type: "regex"
        • Readonly zero: "_"
  • Readonly contents: readonly [{
        type: "required";
        value: typeof InstrumentName;
    }, {
        type: "optional";
        value: typeof InstrumentAbbreviation;
    }, {
        type: "optional";
        value: typeof InstrumentSound;
    }, {
        label: "instrument-types";
        type: "label";
        value: {
            type: "zeroOrMore";
            value: {
                choices: readonly [typeof Solo, typeof Ensemble];
                type: "choices";
            };
        };
    }, {
        type: "optional";
        value: typeof VirtualInstrument;
    }]
  • Readonly name: "score-instrument"

Methods

Generated using TypeDoc